/* ================================================
   Luigi D'Acunto — Personal CV
   ================================================ */

:root {
  --accent:       #6366f1;
  --accent-dark:  #4f46e5;
  --sidebar-bg:   #0f172a;
  --text-body:    #475569;
  --text-heading: #0f172a;
  --text-muted:   #94a3b8;
  --bg-content:   #ffffff;
  --border:       #e2e8f0;
}

/* ---- Base ---- */

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  color: var(--text-body);
  background: var(--bg-content);
  padding-top: 56px;
}

@media (min-width: 992px) {
  body {
    padding-top: 0;
    padding-left: 17rem;
  }
}

/* ---- Typography ---- */

h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

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

p.lead {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-body);
}

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

a:hover, a:focus {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ---- Sidebar / Nav ---- */

#sideNav {
  background-color: var(--sidebar-bg);
}

#sideNav .navbar-brand {
  color: #f8fafc;
}

#sideNav .navbar-nav .nav-link {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  padding: 0.5rem 1rem;
  transition: color 0.15s ease;
}

#sideNav .navbar-nav .nav-link:hover,
#sideNav .navbar-nav .nav-link.active {
  color: #f8fafc;
}

#sideNav .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.2);
}

#sideNav .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.4);
}

@media (min-width: 992px) {
  #sideNav {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 17rem;
    height: 100vh;
    text-align: center;
  }

  #sideNav .navbar-brand {
    display: flex;
    margin: auto auto 0;
    padding: 0.75rem;
  }

  #sideNav .navbar-brand .img-profile {
    max-width: 9rem;
    max-height: 9rem;
    border: 3px solid rgba(255, 255, 255, 0.15);
  }

  #sideNav .navbar-collapse {
    display: flex;
    align-items: flex-start;
    flex-grow: 0;
    width: 100%;
    margin-bottom: auto;
    padding-top: 1rem;
  }

  #sideNav .navbar-collapse .navbar-nav {
    flex-direction: column;
    width: 100%;
  }

  #sideNav .navbar-collapse .navbar-nav .nav-link {
    display: block;
    padding: 0.6rem 1.5rem;
  }
}

/* ---- Resume Sections ---- */

.resume-section {
  padding: 4rem 2rem;
  max-width: 75rem;
}

@media (min-width: 768px) {
  .resume-section {
    min-height: 100vh;
  }
}

@media (min-width: 992px) {
  .resume-section {
    padding: 4rem 3rem;
  }
}

.resume-section-content {
  width: 100%;
}

/* ---- Resume Items ---- */

.resume-item {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin-bottom: 2.5rem;
}

.resume-item:last-child {
  margin-bottom: 0;
}

.resume-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.resume-date {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 0.15rem;
}

/* ---- Social Icons ---- */

.social-icons {
  display: flex;
  gap: 0.75rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background-color: #334155;
  color: #f8fafc;
  border-radius: 50%;
  font-size: 1.1rem;
  transition: background-color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
}

.social-icons a:hover {
  background-color: var(--accent);
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
}

/* ---- Dev Icons (Skills) ---- */

.dev-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0;
  list-style: none;
}

.dev-icons .list-inline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.dev-icons .list-inline-item i {
  font-size: 2.25rem;
  color: var(--text-heading);
  transition: color 0.15s ease;
}

.dev-icons .list-inline-item:hover i {
  color: var(--accent);
}

.icon-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* ---- Tech tags (dentro le experience card) ---- */

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.badge-tech {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: #334155;
  background-color: #f1f5f9;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

/* ---- Skill level blocks ---- */

.skill-level-block {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.skill-level-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  white-space: nowrap;
  margin-top: 0.1rem;
  min-width: 6rem;
  text-align: center;
}

.skill-level-label.advanced  { background: var(--accent); color: #fff; }
.skill-level-label.proficient{ background: #475569; color: #fff; }
.skill-level-label.familiar  { background: transparent; color: #94a3b8; border: 1px solid #cbd5e1; }

/* ---- Skill Badges ---- */

.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex: 1;
}

.badge-skill {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  font-size: 0.76rem;
  font-weight: 500;
  border-radius: 999px;
}

.badge-skill.advanced {
  color: var(--accent);
  background-color: #eef2ff;
  border: 1px solid #c7d2fe;
}

.badge-skill.proficient {
  color: #334155;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
}

.badge-skill.familiar {
  color: #94a3b8;
  background-color: transparent;
  border: 1px solid #e2e8f0;
}

.badge-skill.soft {
  color: #0f766e;
  background-color: #f0fdfa;
  border: 1px solid #99f6e4;
}

/* ---- Cert topic tags ---- */

.cert-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.cert-topics span {
  font-size: 0.72rem;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.15rem 0.55rem;
}

/* ---- Nav footer (link ad altre pagine, pinned bottom sidebar) ---- */

@media (min-width: 992px) {
  .nav-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    align-items: flex-start;
  }
}

.nav-link-ext {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link-ext:hover {
  color: #f8fafc;
  text-decoration: none;
}

.page-version {
  display: block;
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.12);
  letter-spacing: 0.06em;
  margin-top: 0.5rem;
}

/* ---- Accent color utility ---- */

.text-accent {
  color: var(--accent);
}

/* ---- HR dividers ---- */

hr {
  border-color: var(--border);
  opacity: 1;
}
