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

:root {
  --color-bg: #0f0f11;
  --color-surface: #1a1a1f;
  --color-border: #2a2a32;
  --color-text: #e8e8ed;
  --color-text-muted: #8888a0;
  --color-accent: #7c6aff;
  --color-accent-hover: #9b8dff;
  --color-link: #7c6aff;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;

  --radius: 10px;
  --max-width: 760px;
}

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

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================
   Typography
   ============================ */
h1 { font-size: 2.2rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: 1rem; font-weight: 600; }

h1, h2, h3, h4 { letter-spacing: -0.02em; }

p { color: var(--color-text-muted); }
p + p { margin-top: var(--spacing-sm); }

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--color-accent-hover); text-decoration: underline; }

strong { color: var(--color-text); font-weight: 600; }
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-surface);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

ul, ol {
  padding-left: 1.5rem;
  color: var(--color-text-muted);
}
li + li { margin-top: 0.35rem; }

/* ============================
   Layout
   ============================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

main {
  flex: 1;
  padding: var(--spacing-xl) 0;
}

/* ============================
   Navigation
   ============================ */
nav {
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing-sm) 0;
  position: sticky;
  top: 0;
  background: rgba(15, 15, 17, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
}

.nav-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav-brand:hover { color: var(--color-accent); text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  list-style: none;
  padding: 0;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 500;
}
.nav-links a:hover { color: var(--color-text); text-decoration: none; }
.nav-links a.active { color: var(--color-text); }

/* ============================
   Footer
   ============================ */
footer {
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-lg) 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.footer-inner p {
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: var(--spacing-md);
  list-style: none;
  padding: 0;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ============================
   Animations
   ============================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================
   Hero
   ============================ */
.hero {
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--spacing-xl);
  position: relative;
  animation: fadeUp 0.5s ease both;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -40px;
  width: 420px;
  height: 320px;
  background: radial-gradient(ellipse at top left, rgba(124, 106, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
}

.hero-text { flex: 1; }

.hero-avatar {
  flex-shrink: 0;
}

.hero-avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border);
}

.hero h1 { margin-bottom: var(--spacing-sm); }
.hero p { font-size: 1.1rem; max-width: 560px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

/* ============================
   Buttons
   ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
  text-decoration: none;
}

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

/* ============================
   Cards / Grid
   ============================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--spacing-md);
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--color-accent); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.card h3 { margin-bottom: 0.4rem; }

/* ============================
   Section
   ============================ */
.section { margin-bottom: var(--spacing-xl); }
.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
}

/* ============================
   CV / Resume specific
   ============================ */
.cv-header {
  margin-bottom: var(--spacing-xl);
}

.cv-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.cv-print-btn { align-self: center; }

.cv-header h1 { margin-bottom: 0.3rem; }

.cv-contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
  font-size: 0.9rem;
}

.cv-contact a { color: var(--color-text-muted); }
.cv-contact a:hover { color: var(--color-accent); text-decoration: none; }

.cv-block { margin-bottom: var(--spacing-xl); }
.cv-block h2 {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--spacing-md);
}

.cv-entry { margin-bottom: var(--spacing-md); }
.cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.cv-entry-header h3 { margin: 0; }
.cv-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.cv-company {
  font-size: 0.9rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.cv-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cv-skill-tag {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ============================
   Privacy Policy specific
   ============================ */
.policy-header {
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
}

.policy-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--spacing-xs);
}

.policy-body h2 {
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

.policy-body p, .policy-body ul, .policy-body ol {
  margin-bottom: var(--spacing-sm);
}

/* ============================
   Divider
   ============================ */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--spacing-xl) 0;
}

/* ============================
   Social icon links
   ============================ */
.social-links {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: all 0.15s;
  font-weight: 500;
}
.social-link:hover {
  color: var(--color-text);
  border-color: var(--color-accent);
  text-decoration: none;
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 600px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.25rem; }
  main { padding: var(--spacing-lg) 0; }

  .hero-avatar { display: none; }

  .cv-entry-header {
    flex-direction: column;
    gap: 0.1rem;
  }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .nav-links { gap: var(--spacing-sm); }
}

/* ============================
   Notes list
   ============================ */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.note-entry {
  display: block;
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.15s ease;
}
.note-entry:first-child { border-top: 1px solid var(--color-border); }
.note-entry:hover { padding-left: 0.5rem; text-decoration: none; }
.note-entry:hover h3 { color: var(--color-accent); }

.note-meta {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: 0.35rem;
}

.note-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.note-entry h3 {
  margin-bottom: 0.25rem;
  transition: color 0.15s ease;
}

/* ============================
   Print (CV)
   ============================ */
@media print {
  :root {
    --color-bg: #fff;
    --color-surface: #f5f5f5;
    --color-border: #ddd;
    --color-text: #111;
    --color-text-muted: #555;
    --color-accent: #5040cc;
    --color-link: #5040cc;
  }

  body { background: #fff; }

  nav, footer { display: none; }

  main { padding: 0; }

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

  .hero::before { display: none; }

  a { color: var(--color-accent); text-decoration: none; }

  .cv-block { page-break-inside: avoid; }
  .cv-entry { page-break-inside: avoid; }

  .cv-skill-tag {
    border: 1px solid #ccc;
    background: #f5f5f5;
    color: #444;
  }

  .btn { display: none; }
}
