:root {
  --bg: #141210;
  --bg-alt: #1d1a17;
  --bg-raised: #27231f;
  --text: #f3efe6;
  --text-dim: #a39b8e;
  --accent: #ffb703;
  --accent-soft: rgba(255, 183, 3, 0.12);
  --accent-2: #e3b37c;
  --border: rgba(243, 239, 230, 0.1);
  --border-strong: rgba(243, 239, 230, 0.2);
  --hover: rgb(166, 128, 13);

  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;

  --sidebar-width: 260px;
  --content-max: 720px;
  --radius: 5px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/*===SideBar===*/

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 2.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--bg);
  overflow-y: auto;
  z-index: 10;
}

.sidebar-top {
  margin-bottom: 2.5rem;
}

.profile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.profile-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.profile-role {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 2.5rem;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  border-left: 2px solid transparent;
  padding-left: 0.9rem;
  margin-left: -0.9rem;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active {
  border-left-color: var(--accent);
  color: var(--accent);
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: auto;
}

.social-links a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  transition: color 0.15s ease;
}

.social-links a:hover {
  color: var(--accent);
}

.social-links svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 20;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-alt);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/*=== Main Content ===*/

.content {
  margin-left: var(--sidebar-width);
  padding: 6rem 3.5rem 4rem;
  max-width: calc(var(--content-max) + 27rem);
}

.eyebrow-plain {
  color: var(--accent);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.hero {
  margin-bottom: 6rem;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  max-width: 12ch;
}

.hero-name {
  color: var(--accent);
}

.hero-lede {
  max-width: var(--content-max);
  color: var(--text-dim);
  font-size: 1.05rem;
  margin: 1.5rem 0 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #12141c;
}
.btn-primary:hover {
  background: var(--hover);
}

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/*===Sections===*/

.section {
  padding-top: 3.5rem;
  margin-top: 3.5rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 2.5rem;
}

.section-title {
  font-size: 1.9rem;
  margin-bottom: 0.6rem;
}

.section-intro {
  color: var(--text-dim);
  max-width: 56ch;
  margin: 0 0 2.25rem;
}

/* Skills */
.skills-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}

.skills-group h3 {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.skill-item {
  --level: 0%;
}

.skill-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.skill-label span:first-child {
  color: var(--text);
}

.skill-percent {
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
}

.skill-track {
  position: relative;
  height: 5px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.skill-fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-item.in-view .skill-fill {
  width: var(--level);
}

@media (prefers-reduced-motion: reduce) {
  .skill-fill {
    width: var(--level);
    transition: none;
  }
}

/* Training timeline */
.timeline {
  position: relative;
  padding-left: 1.75rem;
  border-left: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.99rem;
  top: 0.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-date {
  display: block;
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.timeline-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}
.timeline-item p {
  color: var(--text-dim);
  margin: 0;
  max-width: 56ch;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

.project-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-image {
  aspect-ratio: 16 / 10;
  background: var(--bg-raised);
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body {
  padding: 1.25rem 1.35rem 1.5rem;
}

.project-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.project-body p {
  color: var(--text-dim);
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.tech-tags li {
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-dim);
}

.project-links {
  display: flex;
  gap: 1.1rem;
}

.project-links a {
  font-size: 0.9rem;
  color: var(--accent-2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.project-links a:hover {
  border-color: var(--accent-2);
}

/* Contact */
.contact-list {
  display: flex;
  flex-direction: column;
  max-width: var(--content-max);
}

.contact-list li {
  border-bottom: 1px solid var(--border);
}
.contact-list li:first-child {
  border-top: 1px solid var(--border);
}

.contact-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0.25rem;
  transition:
    padding-left 0.15s ease,
    color 0.15s ease;
}

.contact-list a:hover {
  padding-left: 0.6rem;
  color: var(--accent);
}

.contact-list svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
  color: var(--text-dim);
}

.contact-list a:hover svg {
  color: var(--accent);
}

.contact-list strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.contact-list span {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.contact-list span:nth-child(2) {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
}

/*===Responsive===*/

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: min(80vw, 300px);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content {
    margin-left: 0;
    padding: 5.5rem 1.5rem 3rem;
  }

  .hero {
    margin-bottom: 4rem;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 5.5rem 1.1rem 2.5rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
