/* This is the required project styling. Will contain essential CSS styles like:
   * Flex property
   * Grid layout
   * Cards and sections
*/

@import url(https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60;400;500;600;700&display=swap);

/* variables */
:root {
  /* Colors */
  --primary-color: #b85c38;
  --secondary-color: #a78b73;
  --bg-primary: #fbfaf7;
  --text-color: #25211c;
  --text-color-two: #ffffff;
  --text-primary: #25211c;
  --text-secondary: #6d665c;
  --bg-secondary: #25211c;
  --card-background: #fffdfa;
  --bg-secondary-two: #ede5d8;
  --surface-warm: #efe6d7;
  --console-bg: #231f1a;
  --console-muted: #b8aa98;
  --border-color: rgba(37, 33, 28, 0.14);

  --shadow: 0 22px 70px rgba(57, 42, 31, 0.14);
  --shadow-sm: 0 10px 30px rgba(57, 42, 31, 0.08);
  --font-body: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Source Serif 4", Georgia, serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  /* Font Weight */
  --weight-small: 400;
  --weight-semibold: 600;
  --weight-bold: 800;

  /* Max width */
  --width-small: 600px;
  --width-medium: 1100px;
  --width-large: 1300px;
}

[data-theme="dark"] {
  --primary-color: #e7a16f;
  --secondary-color: #f0c19c;
  --bg-primary: #171512;
  --text-color: #f8f4ee;
  --text-color-two: #171512;
  --text-primary: #f8f4ee;
  --text-secondary: #c7bdb2;
  --bg-secondary: #f8f4ee;
  --card-background: #211e19;
  --bg-secondary-two: #f8f4ee;
  --surface-warm: #28231d;
  --console-bg: #0f0e0c;
  --console-muted: #b9aa98;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
  --font-body: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Source Serif 4", Georgia, serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

/* Reset default styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

ul {
  list-style: none;
}

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

/* Main styling */
body {
  background:
    radial-gradient(circle at top left, rgba(184, 92, 56, 0.12), transparent 34rem),
    linear-gradient(180deg, var(--bg-primary) 0%, #fffaf2 48%, var(--bg-primary) 100%);
  color: var(--text-color);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.12;
}

#logo {
  margin-right: auto;
}

#logo a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0;
}

.logo-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 10px;
  border-radius: 11px;
  background: #b85c38;
  color: #ffffff;
}

.logo-glyph {
  height: 22px;
  width: auto;
  display: block;
}

.logo-animate .logo-thread {
  stroke-dasharray: 74;
  stroke-dashoffset: 74;
  animation: logo-thread-draw 1s ease 0.2s forwards;
}

.logo-animate .logo-node {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  animation: logo-node-pop 0.35s ease forwards;
}

.logo-animate .logo-node:first-of-type {
  animation-delay: 0.15s;
}

.logo-animate .logo-node:last-of-type {
  animation-delay: 1.1s;
}

@keyframes logo-thread-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes logo-node-pop {
  0% {
    transform: scale(0);
  }
  70% {
    transform: scale(1.4);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-thread {
    stroke-dashoffset: 0;
    animation: none;
  }
  .logo-node {
    transform: scale(1);
    animation: none;
  }
}

.logo-mark .status-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--bg-primary);
}

.logo-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  white-space: nowrap;
}

.logo-name-main {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

.logo-name-role {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-top: 3px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--bg-primary);
  box-shadow: 0 8px 30px rgba(57, 42, 31, 0.06);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(18px);
  background-color: color-mix(in srgb, var(--bg-primary) 88%, transparent);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  height: 80px;
  width: 100%;
  max-width: 100%;
  padding: 0 3rem;
}

.navbar .nav-menu {
  display: flex;
  align-items: center;
}

.navbar .nav-link {
  position: relative;
  margin: 0 1rem;
  font-size: 0.75rem;
  font-weight: var(--weight-semibold);
  padding-bottom: 0.45rem;
  letter-spacing: 0.02em;
}

.navbar .nav-link:not(.btn)::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  bottom: 0;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none' fill='none' stroke='%23ffcd42' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M2 5C22 2 45 3 60 4C74 5 88 5 98 3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  opacity: 0;
  transform: scaleX(0.6);
  transform-origin: left center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
  color: var(--primary-color);
}

.navbar .nav-link:not(.btn):hover::after,
.navbar .nav-link:not(.btn):focus::after,
.navbar .nav-link.active:not(.btn)::after {
  opacity: 1;
  transform: scaleX(1);
}

.navbar .nav-link.btn {
  border-bottom: 0;
  padding-bottom: 0.75rem;
}

.navbar .nav-link.btn:hover,
.navbar .nav-link.btn:focus {
  color: var(--text-color-two);
}

.navbar #logo img {
  display: block;
}

.navbar .btn {
  margin-right: 1.5rem;
}

.fas.fa-arrow-right {
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

/* hamburger */
.hamburger {
  margin-bottom: 0.1rem;
  display: none;
}

.bar {
  display: block;
  width: 23px;
  height: 3px;
  margin: 4px auto;
  transition: all 0.3s ease-in-out;
  border-radius: 30px;
  background-color: var(--bg-secondary);
}

/* Hero section */
#hero {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.profile-image {
  width: 150px;
  border-radius: 50%;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  from {
    transform: translateY(0px);
  }

  to {
    transform: translateY(-10px);
  }
}

.division {
  width: 100%;
  height: 2px;
  background-color: var(--card-background);
  margin: 2.5rem 0;
}
/* Projects */
#projects {
  display: flex;
  flex-direction: column;
  margin: 1rem auto 2rem;
}

#projects .btn {
  align-self: center;
  margin: 2rem 0;
}

.project {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(250px, auto);
  grid-gap: 0.9rem;
}

.card .project-bio p {
  font-size: 0.83rem;
}

.card .project-bio h3 {
  font-size: 0.9rem;
}

.project-info {
  display: flex;
  justify-content: space-between;
  opacity: 0;
  position: relative;
  transition: 0.5s ease-in-out;
}

.project-bio {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  top: 160px;
  left: 10px;
}

/* Footer */
#footer {
  background: #111111;
  color: #ffffff;
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr 1.3fr;
  gap: 40px;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-color);
  margin: 0 0 16px;
}

.footer-brand h3 {
  font-size: 1.15rem;
  margin: 0 0 12px;
  color: #ffffff;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 18px;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 14px;
  align-items: center;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

.footer-social img {
  width: 18px;
  height: 18px;
}

.footer-social i {
  font-size: 18px;
  color: #ffffff;
}

.footer-social .footer-ibexa {
  width: 30px;
  height: 30px;
  background: #ffffff;
  overflow: hidden;
  align-self: center;
}

.footer-social .footer-ibexa img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.footer-col a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--primary-color);
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer-contact i {
  color: var(--primary-color);
  width: 16px;
  text-align: center;
}

.footer-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #07b500;
  display: inline-block;
  animation: pulse-dot 2s infinite;
}

.footer-cta {
  margin-top: 16px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 22px;
  text-align: center;
}

.footer-bottom .copyright {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 8px;
}

.footer-bottom .footer-legal {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 540px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
    text-align: center;
  }
  .footer-brand p {
    max-width: 100%;
  }
  .footer-social,
  .footer-contact li {
    justify-content: center;
  }
}

/* Responsiveness */

@media (max-width: 1000px) {
  .project {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
}

@media (max-width: 1350px) {
  .navbar .container {
    display: grid;
    grid-template-columns: minmax(0, auto) 1fr auto;
    column-gap: 0.75rem;
    padding: 0 1.5rem;
  }

  #logo {
    min-width: 0;
  }

  .navbar .nav-menu {
    position: fixed;
    right: -100vw;
    top: 4.5rem;
    flex-direction: column;
    width: calc(80% - 10px);
    transition: 0.3s;
    box-shadow: var(--shadow);
    padding: 2rem;
    border-radius: 5px;
    align-items: flex-start;
    background: var(--bg-primary);
  }

  .navbar .btn {
    margin: 0;
    margin-top: 1rem;
  }

  .nav-menu.active {
    right: 20px;
  }

  .nav-menu .nav-link {
    font-size: 0.9rem;
    margin: 0 0.2rem;
  }

  .nav-menu li {
    margin-bottom: 0.5rem;
    width: 100%;
  }

  .nav-menu .btn {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }

  .hamburger {
    display: block;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    justify-self: end;
    grid-column: 3;
    position: relative;
    z-index: 30;
  }

  .hamburger.active {
    border: 1px dotted gray;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

@media (max-width: 600px) {
  .project {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .navbar .container {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 1rem;
  }

  .logo-name {
    font-size: 0.95rem;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .hamburger {
    grid-column: 2;
    display: block;
  }

  .hamburger {
    padding: 0.2rem;
  }
}

.offers-layout .offer-help-wrap {
  justify-content: flex-end;
  margin: 1.5rem 0 0;
}

.offer-help-wrap {
  display: flex;
  justify-content: flex-end;
  margin: 1.5rem 0 0;
}

.offer-help-note {
  position: relative;
  width: 250px;
  padding: 1.4rem 1.3rem 1.2rem;
  background: #fff6c8;
  color: #4a3f1e;
  border-radius: 3px;
  transform: rotate(2.5deg);
  box-shadow: 0 10px 22px rgba(57, 42, 31, 0.18);
  transition: transform 0.2s ease;
}

.offer-help-note:hover {
  transform: rotate(0deg);
}

.offer-help-note::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 96px;
  height: 26px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(240, 225, 170, 0.55);
  border: 1px solid rgba(180, 160, 110, 0.35);
}

.offer-help-title {
  font-family: "Caveat", cursive;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.offer-help-copy {
  font-family: "Caveat", cursive;
  font-size: 1.12rem;
  line-height: 1.25;
  margin-bottom: 0.8rem;
  color: #5c4f28;
}

.offer-help-link {
  display: inline-block;
  font-family: "Caveat", cursive;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  .offers-layout .offer-help-wrap {
    justify-content: center;
  }
}

.budget-section {
  text-align: left;
}

.budget-section::after {
  content: "";
  display: block;
  clear: both;
}

.budget-section .compact-section-title {
  text-align: left;
}

.budget-section p.compact-copy {
  max-width: none;
  margin: 0 0 1rem;
  padding: 0;
  text-align: left;
}

.budget-chart {
  float: right;
  width: 460px;
  max-width: 48%;
  margin: 0.4rem 0 1.5rem 2.5rem;
  padding: 1.4rem 1.4rem 1.1rem;
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  shape-outside: inset(0 round 14px);
}

.budget-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.budget-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.budget-legend-item em {
  font-style: normal;
  opacity: 0.7;
  font-size: 0.82em;
}

.budget-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

.budget-swatch.is-me,
.budget-bar.is-me {
  background: var(--primary-color);
}

.budget-swatch.is-freelance,
.budget-bar.is-freelance {
  background: var(--secondary-color);
}

.budget-swatch.is-ssii,
.budget-bar.is-ssii {
  background: var(--border-color);
  border: 1px solid var(--secondary-color);
}

.budget-plot {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  padding: 2.75rem 0.75rem 0;
}

.budget-group {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  min-width: 0;
}

.budget-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 240px;
  border-bottom: 2px solid var(--border-color);
}

.budget-bar {
  position: relative;
  width: 20px;
  max-width: 28%;
  height: calc(var(--h) * 1%);
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  transition: height 0.6s ease;
}

.budget-val {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform-origin: left bottom;
  transform: translateX(1px) rotate(-55deg);
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: -0.02em;
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  color: var(--text-secondary);
}

.budget-bar.is-me .budget-val {
  color: var(--primary-color);
  font-weight: var(--weight-bold);
}

.budget-label {
  margin-top: 0.85rem;
  font-size: 0.72rem;
  line-height: 1.15;
  font-weight: var(--weight-semibold);
  text-align: center;
  color: var(--text-primary);
}

.budget-note {
  margin-top: 1.6rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
  opacity: 0.85;
}

@media (max-width: 860px) {
  .budget-chart {
    float: none;
    width: 100%;
    max-width: 560px;
    margin: 1.5rem auto 2rem;
    shape-outside: none;
  }
}

@media (max-width: 640px) {
  .budget-plot {
    gap: 0.3rem;
    padding-top: 2.25rem;
  }

  .budget-bars {
    height: 190px;
    gap: 5px;
  }

  .budget-bar {
    width: 15px;
  }

  .budget-val {
    font-size: 0.55rem;
  }

  .budget-label {
    font-size: 0.66rem;
  }
}
