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

:root {
  --bg:         #1a1a1a;
  --bg-mid:     #1c1f28;
  --bg-end:     #2a2d35;
  --nav-bg:     rgba(26, 26, 26, 0.85);
  --nav-bg-mobile: rgba(26, 26, 26, 0.98);
  --accent:     #c4601a;
  --accent-text: #d4722a;
  --accent-dim: rgba(196, 96, 26, 0.15);
  --accent-tint: rgba(196, 96, 26, 0.1);
  --accent-tint-hover: rgba(196, 96, 26, 0.25);
  --accent-hover: rgba(196, 96, 26, 0.3);
  --accent-bdr: rgba(196, 96, 26, 0.35);
  --accent-glow: rgba(196, 96, 26, 0.5);
  --accent-line: rgba(196, 96, 26, 0.6);
  --text-1:     #f0ede8;
  --text-2:     #888;
  --text-3:     #666;
  --text-tag:   #c8c3bc;
  --text-project: #e8e4de;
  --text-thesis: #a09a94;
  --text-footer-accent: #7a3e10;
  --muted:      #555;
  --glass-bg:   rgba(255, 255, 255, 0.04);
  --glass-bg-subtle: rgba(255, 255, 255, 0.03);
  --glass-bg-strong: rgba(255, 255, 255, 0.06);
  --glass-bg-tag: rgba(255, 255, 255, 0.08);
  --glass-bdr-subtle: rgba(255, 255, 255, 0.05);
  --glass-bdr:  rgba(255, 255, 255, 0.08);
  --glass-bdr-thesis: rgba(255, 255, 255, 0.07);
  --glass-bdr-tag: rgba(255, 255, 255, 0.18);
  --glass-bdr-hover: rgba(255, 255, 255, 0.2);
  --photo-bg-start: #2e2e2e;
  --photo-bg-end: #3a3a3a;
  --project-quantum-start: #0d0d1a;
  --project-quantum-middle: #1a1040;
  --project-quantum-end: #0d1a1a;
  --project-smart-start: #0d1a0d;
  --project-smart-middle: #1a2a1a;
  --project-smart-end: #0d150d;
  --project-ferrum-start: #1a0d0d;
  --project-ferrum-middle: #2a1510;
  --radius:     10px;
  --font-display: 'Bebas Neue', system-ui, sans-serif;
  --font-heading: 'Syne', system-ui, sans-serif;
  --font-body:    'Open Sans', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg-end) 40%, var(--bg-mid) 70%, var(--bg) 100%);
  min-height: 100vh;
  overflow-x: clip;
}

/* ─── Nav ───────────────────────────────────────────────── */
#nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  position: sticky;
  top: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--glass-bdr-subtle);
  z-index: 100;
}
.nav-logo {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: .04em;
}
.nav-links {
  display: grid;
  grid-template-columns: 58px 82px 66px 108px 70px auto;
  column-gap: 28px;
  align-items: center;
}
.nav-link {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--accent); }
.nav-lang {
  font-size: 11px;
  font-family: inherit;
  color: var(--accent);
  background: transparent;
  border: 0.5px solid var(--accent-bdr);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.nav-lang:hover { background: var(--accent-dim); }
.nav-menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 0.5px solid var(--glass-bdr);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}
.nav-menu-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  margin: 4px auto;
  background: var(--text-1);
}
.nav-menu-toggle:hover { border-color: var(--accent-bdr); }
.nav-menu-toggle:focus-visible,
.nav-link:focus-visible,
.nav-lang:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ─── Sections ──────────────────────────────────────────── */
main { position: relative; z-index: 1; }
section {
  padding: 40px 48px;
  max-width: 900px;
  margin: 0 auto;
  scroll-margin-top: 72px;
}
#projects { padding-block: 56px; }
#certifications { padding-block: 28px; }
.section-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 40px;
  letter-spacing: -.01em;
}

/* ─── Hero ──────────────────────────────────────────────── */
.hero {
  padding: 64px 48px 24px;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.hero-enter {
  animation: hero-enter .6s ease both;
}
@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.hero-main {
  display: flex;
  align-items: center;
  gap: 48px;
}
.hero-photo {
  width: 192px;
  height: 256px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--photo-bg-start), var(--photo-bg-end));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hero-photo svg {
  width: 40px;
  height: 40px;
  fill: var(--accent-bdr);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}
.hero-name {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 400;
  line-height: 1.05;
  color: var(--text-1);
  margin-bottom: 6px;
  letter-spacing: .02em;
  overflow-wrap: anywhere;
  min-width: 0;
}
.hero-title {
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 16px;
}
.hero-desc {
  font-size: 13px;
  color: var(--text-2);
  max-width: 380px;
  min-height: calc(4 * 1.7em);
  margin-bottom: 22px;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}
.hero-contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.btn-ghost {
  font-size: 12px;
  font-family: inherit;
  background: transparent;
  color: var(--text-2);
  border: 0.5px solid var(--glass-bdr);
  padding: 8px 18px;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { color: var(--text-1); border-color: var(--glass-bdr-hover); }
.hero-socials {
  display: flex;
  gap: 10px;
}
.hero-email {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  box-sizing: border-box;
  font-size: 12px;
  color: var(--text-2);
  background: var(--glass-bg);
  border: 0.5px solid var(--glass-bdr);
  border-radius: 6px;
  padding: 0 10px;
  text-decoration: none;
  user-select: text;
  transition: border-color .2s, background .2s, color .2s;
}
.hero-email:hover { color: var(--accent); border-color: var(--accent-bdr); background: var(--accent-dim); }
.social-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--glass-bg);
  border: 0.5px solid var(--glass-bdr);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, background .2s;
}
.social-icon:hover { border-color: var(--accent-bdr); background: var(--accent-dim); }
.social-icon svg {
  width: 15px;
  height: 15px;
  fill: var(--text-2);
  transition: fill .2s;
}
.social-icon:hover svg { fill: var(--accent); }

/* Stack row */
.hero-stack {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-top: 0.5px solid var(--glass-bg-strong);
  border-bottom: 0.5px solid var(--glass-bg-strong);
}
.stack-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.stack-icon {
  width: 44px;
  height: 44px;
  fill: var(--accent);
  color: var(--accent);
  opacity: .85;
  transition: opacity .2s;
}
.stack-item:hover .stack-icon { opacity: 1; }
.stack-item > svg.stack-icon { display: none; }
.stack-item > img.stack-icon {
  filter: brightness(0) saturate(100%) invert(42%) sepia(83%) saturate(1047%) hue-rotate(345deg) brightness(88%) contrast(90%);
  object-fit: contain;
}
.stack-item:nth-child(1) { order: 4; }
.stack-item:nth-child(2) { order: 3; }
.stack-item:nth-child(3) { order: 1; }
.stack-item:nth-child(4) { order: 5; }
.stack-item:nth-child(5) { order: 2; }
.stack-item:nth-child(6) { order: 6; }
.stack-item:nth-child(7) { order: 7; }
.stack-name {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: .02em;
}

/* ─── Glass card ────────────────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  border: 0.5px solid var(--glass-bdr);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color .2s;
}
.glass-card:hover { border-color: var(--accent-hover); }

/* ─── Timeline ──────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent-line), var(--accent-tint));
}
.tl-entry { position: relative; }
.tl-dot {
  position: absolute;
  left: -28px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Card internals */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}
.card-role {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}
.card-date {
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-tint);
  border: 0.5px solid var(--accent-tint-hover);
  padding: 2px 9px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.card-company {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 12px;
}
.card-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-bullet {
  font-size: 12px;
  color: var(--text-2);
  padding-left: 14px;
  position: relative;
}
.card-bullet::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent-glow);
  font-size: 11px;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.tag {
  font-size: 10px;
  color: var(--text-tag);
  background: var(--glass-bg-tag);
  border: 0.5px solid var(--glass-bdr-tag);
  padding: 3px 10px;
  border-radius: 20px;
}

/* ─── Project cards ─────────────────────────────────────── */
.proj-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.proj-card {
  background: var(--glass-bg);
  border: 0.5px solid var(--glass-bdr);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .25s, transform .25s;
  cursor: pointer;
}
.proj-card:hover {
  border-color: var(--accent-bdr);
  transform: translateY(-2px);
}
.proj-img {
  width: 100%;
  aspect-ratio: 16 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proj-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.proj-bg-quantum { background: linear-gradient(135deg, var(--project-quantum-start), var(--project-quantum-middle), var(--project-quantum-end)); }
.proj-bg-smart   { background: linear-gradient(135deg, var(--project-smart-start), var(--project-smart-middle), var(--project-smart-end)); }
.proj-bg-ferrum  { background: var(--project-ferrum-middle); }
.proj-body { padding: 18px 22px; }
.proj-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-project);
  margin-bottom: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.proj-wip {
  font-size: 10px;
  color: var(--accent);
  background: var(--accent-tint);
  border: 0.5px solid var(--accent-tint-hover);
  padding: 2px 8px;
  border-radius: 3px;
}
.proj-desc { font-size: 12px; color: var(--text-2); line-height: 1.65; margin-bottom: 14px; }
.proj-footer { display: flex; justify-content: space-between; align-items: center; }
.proj-link {
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  opacity: .8;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: opacity .2s;
}
.proj-link:hover { opacity: 1; }
.proj-link svg { width: 12px; height: 12px; fill: var(--accent); }

/* ─── Certification cards ───────────────────────────────── */
.cert-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cert-card {
  background: var(--glass-bg);
  border: 0.5px solid var(--glass-bdr);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
  transition: border-color .2s;
  position: relative;
}
.cert-card:hover { border-color: var(--accent-hover); }
.cert-card--featured {
  padding: 20px 24px;
  padding-right: 96px;
  align-items: center;
  text-align: left;
}
.cert-logo {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  background: var(--glass-bg-strong);
  border: 0.5px solid var(--glass-bdr);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cert-logo--text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
}
.cert-card--featured .cert-logo--text {
  width: 128px;
  height: 128px;
  font-size: 30px;
}
.cert-logo--aws,
.cert-logo--spacer {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}
.cert-logo--aws {
  background: transparent;
  border: 0;
}
.cert-logo--spacer {
  background: transparent;
  border: 0;
  visibility: hidden;
}
.cert-logo--aws img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cert-info { flex: 1; min-width: 0; }
.cert-title { font-size: 13px; font-weight: 600; color: var(--text-1); margin-bottom: 2px; }
.cert-issuer { font-size: 11px; color: var(--text-3); }
.cert-badge {
  font-size: 10px;
  color: var(--text-2);
  background: var(--glass-bg);
  border: 0.5px solid var(--glass-bdr);
  padding: 2px 9px;
  border-radius: 3px;
  white-space: nowrap;
  position: absolute;
  top: 10px;
  right: 14px;
}
.cert-badge--accent {
  color: var(--accent);
  background: var(--accent-tint);
  border-color: var(--accent-tint-hover);
}

/* ─── Education cards ───────────────────────────────────── */
.edu-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.edu-card {
  background: var(--glass-bg);
  border: 0.5px solid var(--glass-bdr);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: border-color .2s;
}
.edu-card:hover { border-color: var(--accent-hover); }
.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}
.edu-degree { font-size: 14px; font-weight: 600; color: var(--text-1); }
.edu-uni { font-size: 12px; color: var(--text-3); margin-bottom: 14px; }
.edu-thesis {
  background: var(--glass-bg-subtle);
  border: 0.5px solid var(--glass-bdr-thesis);
  border-radius: 7px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.edu-thesis-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.edu-thesis-title { font-size: 12px; color: var(--text-thesis); line-height: 1.5; }
.edu-thesis-link {
  font-size: 11px;
  color: var(--accent);
  opacity: .8;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity .2s;
}
.edu-thesis-link:hover { opacity: 1; }
.edu-thesis-link svg { width: 11px; height: 11px; fill: var(--accent); }
.edu-grade {
  display: inline-block;
  font-size: 10px;
  color: var(--accent);
  background: var(--accent-tint);
  border: 0.5px solid var(--accent-tint-hover);
  padding: 2px 9px;
  border-radius: 3px;
  margin-top: 10px;
}

/* ─── Footer ────────────────────────────────────────────── */
footer {
  padding: 24px 48px 32px;
  max-width: 900px;
  margin: 0 auto;
  border-top: 0.5px solid var(--glass-bdr-thesis);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-tagline { font-size: 12px; font-weight: 300; color: var(--muted); }
.footer-tagline span { color: var(--text-footer-accent); }
.footer-copy { font-size: 11px; color: var(--muted); }

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 700px) {
  #nav {
    padding: 14px 20px;
  }
  .nav-menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 16px;
    background: var(--nav-bg-mobile);
    border-bottom: 0.5px solid var(--glass-bdr-subtle);
  }
  .nav-links.is-open { display: flex; }
  .nav-link {
    width: 100%;
    padding: 10px 0;
  }
  .nav-lang {
    align-self: flex-start;
    margin-top: 8px;
  }

  /* ── Hero ── */
  .hero {
    padding: 32px 20px 16px;
    gap: 28px;
  }
  .hero-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .hero-photo {
    width: 120px;
    height: 160px;
  }
  .hero-name { font-size: 26px; }
  .hero-desc { font-size: 12px; max-width: 100%; }

  /* ── Tech stack ── */
  .hero-stack {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 0;
    padding: 16px 0;
  }
  .stack-item {
    flex: 0 0 25%;
    gap: 5px;
  }
  .stack-icon {
    width: 30px;
    height: 30px;
  }
  .stack-name { font-size: 10px; }

  /* ── Sections ── */
  section { padding: 28px 20px; }
  .section-title { font-size: 20px; margin-bottom: 24px; }

  /* ── Cert cards ── */
  .cert-card--featured {
    padding: 16px;
    padding-right: 84px;
    gap: 12px;
  }
  .cert-logo--aws,
  .cert-logo--spacer {
    width: 72px;
    height: 72px;
  }
  .cert-badge,
  .cert-badge--accent {
    flex-basis: 100%;
    text-align: center;
    white-space: normal;
  }

  /* ── Card internals ── */
  .card-header { flex-direction: column; gap: 4px; }
  .card-date { align-self: flex-start; }

  /* ── Project cards ── */
  .proj-body { padding: 14px 16px; }
}

