:root {
  --white: #ffffff;
  --bg: #f5f0ea;
  --text-dark: #1a1a1a;
  --text-mid: #444444;
  --text-light: #888888;
  --turquoise: #2e8283;
  --turquoise-light: #dceef0;
  --yellow: #a87f1f;
  --yellow-soft: #f6dfa0;
  --yellow-light: #fdf3d9;
  --border: #e0e0e0;
  --font-main: "Inter", sans-serif;
  --font-display: "Playfair Display", serif;
  --max-width: 900px;
  --sidebar-width: 220px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-main);
  font-size: 15px;
  color: var(--text-mid);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--turquoise);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--text-dark);
}
ul {
  list-style: none;
  text-align: justify;
}
img {
  max-width: 100%;
  display: block;
}

/* HEADER */
.cv-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 2rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  animation: fade-in-down 0.7s ease both;
}

.header-photo {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--yellow-soft),
    var(--turquoise),
    var(--turquoise-light),
    var(--yellow-soft)
  );
  animation: ring-spin 9s linear infinite;
}
.photo-circle {
  position: relative;
  z-index: 1;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background-color: var(--turquoise-light);
  border: 3px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.photo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes ring-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-info {
  flex: 1;
}
.header-name {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.1;
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}
.name-first {
  font-weight: 400;
}
.name-last {
  font-weight: 600;
  color: var(--yellow);
}
.header-title {
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}
.header-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  flex-shrink: 0;
}
.contact-email,
.contact-phone,
.contact-github {
  position: relative;
  display: inline-block;
  font-size: 0.78rem;
  color: var(--turquoise);
  text-decoration: none;
}
.contact-email::after,
.contact-phone::after,
.contact-github::after,
.footer-email::after,
.project-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background-color: var(--yellow);
  transition: width 0.25s ease;
}
.contact-email:hover::after,
.contact-phone:hover::after,
.contact-github:hover::after,
.footer-email:hover::after,
.project-link:hover::after {
  width: 100%;
}
.btn-download {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.5rem 1rem;
  background-color: var(--text-dark);
  color: var(--white) !important;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
  transition:
    background-color 0.2s ease,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease;
}
.btn-download:hover {
  background-color: var(--yellow);
}
.header-divider {
  max-width: var(--max-width);
  margin: 0 auto;
  border: none;
  border-top: 1px solid var(--border);
}

.cv-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 3rem;
  align-items: start;
}
.col-left {
  min-width: 0;
}
.col-right {
  position: sticky;
  top: 2rem;
}

.cv-section {
  margin-bottom: 2.5rem;
}
.section-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-bottom: 0.6rem;
  margin-bottom: 1.2rem;
  border-bottom: 1.5px solid var(--border);
}
.section-title::before {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, var(--yellow), var(--turquoise));
  border-radius: 2px;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.cv-section.visible .section-title::before {
  width: 28px;
}
.item-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.profile-text {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-mid);
  text-align: justify;
}
.exp-item {
  padding: 0.2rem 0;
}
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.6rem;
}
.exp-title-group {
  flex: 1;
  min-width: 0;
}
.exp-company {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.exp-role {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 0.15rem;
}
.exp-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  flex-shrink: 0;
}
.exp-period {
  font-size: 0.78rem;
  color: var(--text-light);
  white-space: nowrap;
}
.exp-location {
  font-size: 0.75rem;
  color: var(--text-light);
  font-style: italic;
}
.exp-bullets {
  margin: 0.5rem 0 0.7rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.exp-bullets li {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.55;
  padding-left: 1rem;
  position: relative;
}
.exp-bullets li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--text-light);
  font-size: 0.8rem;
}

.exp-tags-label {
  font-size: 0.75rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 0.4rem;
}
.project-link {
  position: relative;
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--turquoise) !important;
  white-space: nowrap;
}
.project-link:hover {
  color: var(--text-dark) !important;
}
.wip-badge {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--yellow);
  background-color: var(--yellow-light);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.skills-group {
  margin-bottom: 1.8rem;
}
.skills-group-title {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.skill-item {
  margin-bottom: 0.9rem;
}
.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.35rem;
}
.skill-level {
  font-size: 0.68rem;
  color: var(--text-light);
  font-style: italic;
}
.skill-bar {
  height: 6px;
  background-color: var(--border);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--turquoise), var(--yellow-soft));
  border-radius: 2px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 2rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-text {
  font-size: 0.75rem;
  color: var(--text-light);
  font-family: var(--font-display);
  font-style: italic;
}
.footer-email {
  position: relative;
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-light);
  letter-spacing: 0.02rem;
}
.footer-email:hover {
  color: var(--turquoise);
}

@media (max-width: 680px) {
  .cv-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  .header-contact {
    align-items: center;
  }
  .header-name {
    justify-content: center;
    font-size: 1.8rem;
  }
  .cv-main {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .col-right {
    position: static;
  }
  footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

html {
  scroll-padding-top: 1rem;
}
::selection {
  background-color: var(--yellow-light);
  color: var(--text-dark);
}
#navbar.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  background-color: var(--bg);
}

.exp-item {
  padding: 0.8rem 0.8rem 0.8rem 1rem;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  transition:
    border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  margin-left: -1rem;
}
.exp-item:hover {
  border-left-color: var(--yellow-soft);
  background-color: var(--yellow-light);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(168, 127, 31, 0.1);
}

.exp-item:hover + .item-divider {
  border-top-color: var(--yellow-soft);
}

.cv-section {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.cv-section.visible {
  opacity: 1;
  transform: translateY(0);
}
.skill-item {
  position: relative;
}
.skill-item::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--text-dark);
  color: white;
  font-size: 0.65rem;
  font-family: var(--font-main);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}
.skill-item:hover::after {
  opacity: 1;
}

.exp-project {
  font-size: 0.78rem;
  color: var(--turquoise);
  font-style: italic;
  margin-top: 0.2rem;
}

.recommendation-quote {
  border-left: 3px solid var(--yellow);
  padding: 0.8rem 1rem;
  background-color: var(--yellow-light);
  border-radius: 0 6px 6px 0;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.recommendation-quote:hover {
  transform: translateX(3px);
}
.recommendation-quote p {
  font-size: 0.9rem;
  color: var(--text-dark);
  font-style: italic;
  line-height: 1.6;
}
.recommendation-quote footer {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-light);
  border: none;
  padding: 0;
}

.strengths-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.strengths-list li {
  font-size: 0.78rem;
  color: var(--text-mid);
  padding-left: 0.9rem;
  position: relative;
  line-height: 1.4;
}
.strengths-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--turquoise);
  font-size: 0.7rem;
}

.skills-also {
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 0.2rem;
  line-height: 1.5;
}

.btn-download {
  position: relative;
  overflow: hidden;
}

.btn-download::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--yellow);
  transform: translateX(-101%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-download:hover::before {
  transform: translateX(0);
}

.btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(168, 127, 31, 0.25);
}

.btn-download span {
  position: relative;
  z-index: 1;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(168, 127, 31, 0.45),
    rgba(168, 127, 31, 0) 70%
  );
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    width 0.25s ease,
    height 0.25s ease,
    opacity 0.25s ease;
  opacity: 0;
  z-index: 9999;
}
body.cursor-active .cursor-glow {
  opacity: 1;
}
.cursor-glow.cursor-hover {
  width: 44px;
  height: 44px;
  background: radial-gradient(
    circle,
    rgba(168, 127, 31, 0.3),
    rgba(168, 127, 31, 0) 70%
  );
}
@media (hover: none), (pointer: coarse) {
  .cursor-glow {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cursor-glow,
  .header-photo::before,
  .cv-header {
    animation: none;
  }
}

@media print {
  body {
    background-color: #fff;
    font-size: 11pt;
    color: #000;
  }
  .cv-header {
    padding: 1rem 0;
  }
  .btn-download,
  .btn-download::before,
  .cursor-glow,
  .header-photo::before {
    display: none;
  }
  .cv-main {
    padding: 1rem 0;
    gap: 2rem;
  }
  .col-right {
    position: static;
  }
  .cv-section {
    opacity: 1;
    transform: none;
    page-break-inside: avoid;
  }
  .exp-item {
    page-break-inside: avoid;
    border-left: none;
    transform: none;
    background: none;
  }
  .skill-fill {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  footer {
    border-top: 1px solid #ccc;
  }
}
