/* ─── TOKENS ──────────────────────────────────── */
:root {
  --bg:           #ffffff;
  --bg-alt:       #f5f6f8;
  --bg-dark:      #0d1117;
  --text:         #0d1117;
  --text-2:       #374151;
  --muted:        #6b7280;
  --line:         #e5e7eb;
  --accent:       #1d4ed8;
  --accent-hover: #1e40af;
  --accent-soft:  #eff6ff;
  --radius:       3px;
}

/* ─── RESET ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── LAYOUT ──────────────────────────────────── */
.container {
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
}
.section       { padding: 80px 0; background: var(--bg); }
.section-alt   { background: var(--bg-alt); }

/* ─── HEADER ──────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo { font-size: 20px; font-weight: 800; letter-spacing: 0.04em; }
.logo span { color: var(--accent); }

nav { display: flex; gap: 24px; }
nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s;
}
nav a:hover { color: var(--text); }

.nav-cta {
  padding: 8px 16px;
  border: 1.5px solid var(--text);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  border-radius: var(--radius);
}
.nav-cta:hover { background: var(--text); color: #fff; }

/* ─── BUTTONS ─────────────────────────────────── */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: var(--radius);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary { border: 1.5px solid var(--line); background: var(--bg); color: var(--text); }
.btn-secondary:hover { border-color: #9ca3af; }

/* ─── INTRO ───────────────────────────────────── */
.intro-section {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
}
.intro-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
}
.intro-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.intro-left h1 {
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.0;
}
.intro-title {
  font-size: 16.5px;
  color: var(--muted);
  margin-top: 10px;
  font-weight: 500;
}
.intro-location { font-size: 13px; color: var(--muted); margin-top: 4px; }
.intro-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
  flex-shrink: 0;
}
.intro-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.intro-contact a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.15s;
}
.intro-contact a:hover { color: var(--accent); }
.intro-actions { display: flex; gap: 10px; }

/* ─── SECTION HEADING ─────────────────────────── */
.section-heading {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

/* ─── ABOUT ───────────────────────────────────── */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  align-items: start;
}
.about-block { display: flex; flex-direction: column; gap: 16px; }
.about-block p { font-size: 15.5px; color: var(--muted); line-height: 1.78; }
.about-image { flex-shrink: 0; }
.about-image img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  mix-blend-mode: multiply;
}

/* ─── COMPETENCIES ────────────────────────────── */
.comp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.comp-item {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.section:not(.section-alt) .comp-item { background: var(--bg-alt); }
.comp-item strong { font-size: 13px; font-weight: 700; color: var(--text); }
.comp-item span   { font-size: 12px; color: var(--muted); }

/* ─── TIMELINE ────────────────────────────────── */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 48px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.timeline-item:last-child { border-bottom: 1px solid var(--line); }
.tl-meta { display: flex; flex-direction: column; gap: 5px; padding-top: 2px; }
.tl-date    { font-size: 12px; font-weight: 600; color: var(--muted); }
.tl-company { font-size: 13px; font-weight: 700; color: var(--text); }
.tl-role {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 16px;
}
.tl-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tl-list li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  padding-left: 16px;
  position: relative;
}
.tl-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: 20px;
  line-height: 1.1;
}
.tl-desc { font-size: 14px; color: var(--muted); line-height: 1.7; }
.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}
.tl-tags span {
  padding: 3px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  background: var(--bg);
  border-radius: 2px;
}
.section-alt .tl-tags span { background: var(--bg-alt); }

/* ─── PROJECT CARDS ───────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.personal-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 720px;
}
.project-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.section-alt .project-card { background: var(--bg); }
.project-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.project-header { display: flex; flex-direction: column; gap: 6px; }
.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.project-role { font-size: 11px; font-weight: 600; color: var(--accent); }
.project-year { font-size: 11px; color: var(--muted); white-space: nowrap; }
.project-year a { color: var(--accent); font-weight: 600; }
.project-year a:hover { color: var(--accent-hover); }
.project-header h3 {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}
.project-card > p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
}

/* ─── SKILLS ──────────────────────────────────── */
.skills-list { display: flex; flex-direction: column; }
.skill-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.skill-row:last-child { border-bottom: 1px solid var(--line); }
.skill-label { font-size: 13px; font-weight: 700; color: var(--text); }
.skill-value  { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ─── TOOLS & SOFTWARE ────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.tools-category {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.section:not(.section-alt) .tools-category { background: var(--bg-alt); }
.tools-category h3 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}
.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tools-list span {
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

/* ─── CONTACT ─────────────────────────────────── */
.contact-section { background: var(--bg-dark); color: #fff; }
.contact-section .section-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4b76e8;
  margin-bottom: 18px;
  display: block;
}
.contact-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
}
.contact-inner h2 {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.05;
}
.contact-inner h2 span { color: #4b76e8; }
.contact-sub {
  font-size: 14.5px;
  color: #6b7787;
  margin-top: 14px;
  max-width: 400px;
  line-height: 1.65;
}
.contact-links { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.contact-section .btn-primary  { background: #4b76e8; border-radius: var(--radius); }
.contact-section .btn-primary:hover { background: #3b5fd4; }
.contact-section .btn-secondary {
  border: 1.5px solid #1f2d45;
  background: transparent;
  color: #fff;
  border-radius: var(--radius);
}
.contact-section .btn-secondary:hover { border-color: #4b76e8; }

/* ─── FOOTER ──────────────────────────────────── */
footer { border-top: 1px solid var(--line); background: var(--bg-alt); }
.footer-inner {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-inner span,
.footer-inner a { font-size: 12px; color: var(--muted); }
.footer-inner a { transition: color 0.15s; }
.footer-inner a:hover { color: var(--text); }

/* ─── RESPONSIVE — 900px ──────────────────────── */
@media (max-width: 900px) {
  nav { display: none; }

  .intro-inner { flex-direction: column; align-items: flex-start; gap: 28px; }
  .intro-right { align-items: flex-start; width: 100%; }
  .intro-contact { align-items: flex-start; }

  .about-inner { grid-template-columns: 1fr; gap: 32px; }
  .about-image { max-width: 240px; }

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

  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
  .tl-meta { flex-direction: row; align-items: center; gap: 12px; }

  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .personal-projects-grid { grid-template-columns: 1fr 1fr; max-width: 100%; }

  .skill-row { grid-template-columns: 1fr; gap: 4px; }

  .contact-inner { flex-direction: column; align-items: flex-start; }
  .contact-links { flex-direction: row; flex-wrap: wrap; }
}

/* ─── RESPONSIVE — 600px ──────────────────────── */
@media (max-width: 600px) {
  .container { width: calc(100% - 32px); }

  .comp-grid,
  .tools-grid,
  .projects-grid,
  .personal-projects-grid { grid-template-columns: 1fr; }

  .intro-actions,
  .contact-links { flex-direction: column; width: 100%; }

  .btn-primary,
  .btn-secondary { width: 100%; justify-content: center; }

  .section      { padding: 60px 0; }
  .intro-section { padding: 48px 0 44px; }
}

/* ─── PRINT ───────────────────────────────────── */
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .header,
  .intro-actions,
  .nav-cta,
  .contact-section,
  footer { display: none !important; }

  body { font-size: 11pt; color: #000; background: white; }

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

  .intro-section { padding: 20pt 0 14pt; border-bottom: 0.5pt solid #ccc; }
  .intro-left h1 { font-size: 22pt; }
  .intro-contact a { color: #000; }

  .section, .section-alt { padding: 20pt 0; background: white !important; }

  .section-heading {
    font-size: 8pt;
    margin-bottom: 12pt;
    padding-bottom: 6pt;
    border-bottom: 0.5pt solid #ccc;
    color: #1d4ed8;
  }

  .timeline-item { padding: 14pt 0; border-top: 0.5pt solid #ccc; break-inside: avoid; }
  .tl-role { font-size: 12pt; }
  .tl-list li, .tl-desc, .about-block p,
  .project-card > p, .skill-value { font-size: 10pt; color: #333; }
  .tl-tags { display: none; }

  .comp-grid, .tools-grid { grid-template-columns: repeat(3, 1fr); gap: 5pt; }
  .comp-item, .tools-category { border: 0.5pt solid #ccc; padding: 7pt 9pt; background: white !important; }

  .projects-grid, .personal-projects-grid { grid-template-columns: repeat(2, 1fr); gap: 6pt; }
  .project-card { border: 0.5pt solid #ccc; padding: 9pt; break-inside: avoid; box-shadow: none !important; }

  .skill-row { padding: 8pt 0; border-top: 0.5pt solid #ccc; }

  a[href]::after { content: none; }

  @page { margin: 16mm; }
}
