/* ============================================
   JURE MARINOV — PORTFOLIO
   Black & White Minimal Design
   ============================================ */

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

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --gray-100: #f7f7f7;
  --gray-200: #eeeeee;
  --gray-400: #999999;
  --gray-600: #555555;
  --gray-800: #222222;
  --border: #e0e0e0;
  --font: -apple-system, "SF Pro Display", "Helvetica Neue", Inter, system-ui, sans-serif;
  --font-mono: "SF 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;
}

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;
}

section {
  padding: 80px 0;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--black);
  text-decoration: none;
  line-height: 1;
}

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

.nav-logo-img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  flex-shrink: 0;
  display: block;
}

@media (max-width: 600px) {
  .nav-logo-img {
    width: 26px;
    height: 26px;
    border-radius: 6px;
  }
}

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

.nav-links a {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 450;
  letter-spacing: 0.01em;
  transition: color var(--transition);
}

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

.nav-cta {
  background: var(--black);
  color: var(--white) !important;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  transition: background var(--transition), opacity var(--transition) !important;
}

.nav-cta:hover {
  opacity: 0.8;
}

/* Mobile nav */
.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: var(--black);
  transition: var(--transition);
}

/* ---- Page Header (shared) ---- */
.page-header {
  padding: 100px 0 60px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--gray-600);
  max-width: 600px;
  line-height: 1.6;
}

/* ---- 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.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 16px;
  display: block;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 20px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font);
  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: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ============================================
   HOME PAGE — HERO
   ============================================ */

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

.hero-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--gray-400);
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.0;
  margin-bottom: 24px;
  color: var(--black);
}

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

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--gray-600);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: 40px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

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

.hero-meta-item .label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.hero-meta-item .value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--black);
}

/* ---- Home: Quick Nav ---- */
.home-nav-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
}

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

.home-nav-card {
  background: var(--white);
  padding: 32px 28px;
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.home-nav-card .number {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.home-nav-card h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 4px;
}

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

.home-nav-card .arrow {
  font-size: 1rem;
  color: var(--gray-400);
  margin-top: auto;
  transition: transform var(--transition);
}

.home-nav-card:hover .arrow {
  transform: translateX(4px);
}

/* ---- Home: Featured snapshot ---- */
.featured-snapshot {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

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

.section-header h2 {
  font-size: 1.75rem;
}

.section-header a {
  font-size: 0.8rem;
  color: var(--gray-600);
  transition: color var(--transition);
}

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

/* ---- Home: Live Sites ---- */
.live-sites {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.live-sites-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}

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

.site-card:hover {
  border-color: var(--black);
  transform: translateY(-2px);
  text-decoration: none;
}

.site-card .site-icon {
  width: 36px;
  height: 36px;
  background: var(--gray-100);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray-600);
}

.site-card h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
}

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

.site-card p {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
}

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

.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--gray-100);
  color: var(--gray-600);
}

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

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

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

.project-card {
  background: var(--white);
  padding: 36px 32px;
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-card:hover {
  background: var(--gray-100);
}

.project-card.featured-large {
  grid-column: span 2;
}

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

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

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

.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 {
  font-size: 1.4rem;
}

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

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

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

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

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

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

/* ---- 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(--font-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(--font-mono);
  font-size: 0.62rem;
  color: #333;
  padding: 0 16px;
  white-space: nowrap;
}

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

.cv-panel-meta {
  padding: 6px 16px;
  font-family: var(--font-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;        /* fixed height — always scrollable */
  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(--font-mono);
  font-size: 0.73rem;
  line-height: 1.75;
  color: #c9c9c9;
  display: block;
  white-space: pre;
  tab-size: 2;
  min-width: max-content; /* prevents line wrap, enables horizontal scroll */
}

/* syntax colors */
.cv-code .cm  { color: #555; font-style: italic; }  /* comment */
.cv-code .ck  { color: #aaa; }                       /* keyword */
.cv-code .cfn { color: #e0e0e0; font-weight: 600; } /* function */
.cv-code .cs  { color: #8a8a8a; }                   /* string */
.cv-code .cn  { color: #bbb; }                      /* number */
.cv-code .cv  { color: #c0c0c0; }                   /* variable */

/* Expand button */
.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; }

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

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

/* ---- Projects: Archive ---- */
.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;
}

/* ============================================
   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-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

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

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

.exp-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 3px;
  background: var(--black);
  color: var(--white);
  margin-top: 4px;
  width: fit-content;
}

.exp-main h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 12px;
}

.exp-main > p {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.7;
  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 section */
.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(--font-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);
}

/* ============================================
   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;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-left p {
  font-size: 0.8rem;
  color: var(--gray-400);
}

.footer-left strong {
  color: var(--black);
}

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

.footer-links a {
  font-size: 0.78rem;
  color: var(--gray-400);
  transition: color var(--transition);
}

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

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

.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(--font-mono);
}

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

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

@media (max-width: 700px) {
  .cert-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PDF VIEWER
   ============================================ */

.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: 4px;
  line-height: 1;
}

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

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

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

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

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

  .project-card.featured-large {
    grid-column: span 1;
  }

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

  .experience-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: 1fr;
  }
}

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

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

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 20px;
    gap: 16px;
  }

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

  .nav-toggle {
    display: flex;
  }

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

  .hero h1 {
    font-size: 2.8rem;
  }

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

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

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

  section {
    padding: 60px 0;
  }

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

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

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

  /* CV download bar — stack on mobile */
  .cv-download-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  /* PDF modal — full screen on mobile */
  .pdf-modal-inner {
    width: 100vw;
    height: 100dvh;
    max-width: 100%;
    border-radius: 0;
  }

  /* Code viewer — tighter tabs on mobile */
  .cv-tab {
    padding: 8px 10px;
    font-size: 0.65rem;
  }

  .cv-code {
    height: 280px;
    padding: 12px 14px;
  }

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

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

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

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

  /* Page setup */
  @page {
    size: A4;
    margin: 16mm 18mm;
  }

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

  /* Remove outer section padding */
  .cv-section {
    padding: 0 !important;
  }

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

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

  /* Sidebar */
  .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;
  }

  /* Main content */
  .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;
  }

  /* Skills grid */
  .cv-block div[style*="grid-template-columns:1fr 1fr"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  /* Cert grid */
  .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;
  }

  /* Avoid page break mid-section */
  .cv-block, .cv-entry, .cert-card {
    page-break-inside: avoid;
  }

  /* Links — show URL for email */
  a[href^="mailto"]::after {
    content: " (" attr(href) ")";
    font-size: 7.5pt;
    color: #777;
  }
}

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

/* Focus visible outlines for keyboard navigation */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 3px;
  border-radius: 2px;
}

/* PDF modal close — bigger touch target */
.pdf-modal-close {
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Nav toggle — bigger touch target on mobile */
@media (max-width: 600px) {
  .nav-toggle {
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
  }
}
