:root {
  --beige: #f5ede3;
  --coffee: #5e4635;
  --latte: #e6d3b3;
  --accent: #bfa17b;
  --white: #fff;
  --radius: 1.5rem;
  --shadow: 0 2px 16px 0 #e6d3b360;
}

body, html {
  margin: 0;
  padding: 0;
  background: var(--beige);
  color: var(--coffee);
  font-family: 'Outfit', Arial, sans-serif;
  min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
  background: linear-gradient(135deg, var(--latte) 40%, var(--beige) 100%);
  color: var(--coffee);
  width: 270px;
  min-width: 220px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.2rem 1.3rem 1rem 1.3rem;
  box-shadow: var(--shadow);
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  z-index: 100;
  transition: width 0.2s;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2.2rem;
}

.profile-pic {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 0.8rem;
  border: 3px solid var(--accent);
  box-shadow: 0 2px 16px #bfa17b33;
}

.profile h1 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0.3em 0 0 0;
  text-align: center;
  color: var(--coffee);
  letter-spacing: 2px;
  line-height: 1.15;
}
.profile .role {
  color: var(--accent);
  font-size: 1rem;
  margin: 0.2em 0 0 0;
  font-weight: 400;
  letter-spacing: 1px;
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.7rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.sidebar nav ul li {
  width: 100%;
}
.sidebar nav ul li a {
  display: block;
  text-decoration: none;
  color: var(--coffee);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.45em 1em;
  border-radius: 0.8rem;
  transition: background 0.18s, color 0.18s;
}
.sidebar nav ul li a.active,
.sidebar nav ul li a:hover {
  background: var(--accent);
  color: var(--white);
}

.socials {
  margin-top: auto;
  display: flex;
  gap: 1.2rem;
}
.socials a img {
  width: 28px;
  height: 28px;
  opacity: 0.92;
  transition: opacity 0.15s, transform 0.15s;
}
.socials a:hover img {
  opacity: 1;
  transform: scale(1.16) rotate(-8deg);
}

/* --- MAIN CONTENT --- */
main {
  margin-left: 270px;
  width: calc(100% - 270px);
  background: var(--beige);
  min-height: 100vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: margin 0.2s, width 0.2s;
}

.section {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 2.4rem auto;
  padding: 3.2rem 2.2rem 2.8rem 2.2rem;
}

.hero {
  background: linear-gradient(90deg, var(--latte) 60%, var(--beige) 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 2.2rem;
  text-align: left;
}
.hero h2 {
  font-size: 2.3rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
  color: var(--coffee);
}
.hero .highlight {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.15em;
}

/* --- ABOUT & CONTACT DISTINCT VISUALS --- */
#about.section.card,
#contact.section.card {
  margin-top: 3rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 32px 0 #bfa17b55, 0 1.5px 0 #bfa17baa;
}

#about.section.card {
  background: #fffaf4;
  border-left: 8px solid #bfa17b;
  border-radius: 2rem 1.5rem 1.5rem 2rem;
}

#contact.section.card {
  background: #f5ede3;
  border-right: 8px solid #5e4635;
  border-radius: 1.5rem 2rem 2rem 1.5rem;
}

.card h2 {
  font-size: 2rem;
  margin-top: 0;
  color: var(--coffee);
  margin-bottom: 1.2rem;
  font-weight: 700;
}

.about-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  justify-content: center;
  padding: 0;
  margin: 2rem 0 0 0;
  list-style: none;
}
.about-list li {
  background: var(--latte);
  color: var(--coffee);
  padding: 0.5em 1.2em;
  border-radius: 1em;
  font-size: 1.05rem;
  font-weight: 500;
  box-shadow: 0 1px 5px #e6d3b350;
  transition: background 0.15s, color 0.15s;
}
.about-list li:hover {
  background: var(--accent);
  color: var(--white);
}

.projects-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  justify-content: flex-start;
}
.project {
  flex: 1 1 230px;
  min-width: 225px;
  max-width: 340px;
  background: var(--latte);
  border-radius: 1.1rem;
  box-shadow: 0 2px 10px #bfa17b22;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  transition: box-shadow 0.18s, transform 0.14s;
}
.project:hover {
  box-shadow: 0 4px 24px #bfa17b55;
  transform: translateY(-5px) scale(1.03);
}
.project img {
  width: 60px;
  height: 60px;
  border-radius: 0.7rem;
  object-fit: cover;
  box-shadow: 0 1px 6px #bfa17b33;
}
.project h3 {
  margin: 0 0 0.3em 0;
  color: var(--coffee);
  font-size: 1.12rem;
  font-weight: 700;
}
.project p {
  margin: 0;
  color: var(--coffee);
  font-size: 0.98rem;
  opacity: 0.85;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.3rem;
  margin-top: 1.3rem;
}
.gallery-grid img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 1px 8px #bfa17b33;
  background: var(--latte);
  border: 2px solid var(--latte);
  transition: transform 0.18s, box-shadow 0.15s;
}
.gallery-grid img:hover {
  transform: scale(1.04) rotate(-2deg);
  box-shadow: 0 3px 16px #bfa17b88;
}

#contactForm {
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.input-group {
  width: 100%;
}
#contactForm input,
#contactForm textarea {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border-radius: 1rem;
  border: 1.7px solid var(--accent);
  background: var(--beige);
  color: var(--coffee);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 0 10px #e6d3b312;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
#contactForm input:focus,
#contactForm textarea:focus {
  border: 1.7px solid var(--coffee);
  box-shadow: 0 0 16px #bfa17b55;
}

.btn {
  background: var(--coffee);
  color: var(--white);
  font-weight: bold;
  padding: 0.8rem 1.7rem;
  border-radius: 2rem;
  border: none;
  cursor: pointer;
  font-size: 1.12rem;
  box-shadow: 0 0 8px #bfa17b66;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.13s;
  font-family: inherit;
}
.btn:hover {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 0 20px #bfa17b88;
  transform: scale(1.03);
}

.contact-info {
  margin-top: 1.1rem;
  color: var(--coffee);
  font-size: 1.1rem;
}
.contact-info a {
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
}
.contact-info a:hover {
  text-decoration: underline;
  color: var(--coffee);
}

footer {
  text-align: center;
  color: var(--coffee);
  background: var(--latte);
  padding: 1.1rem 0 1.2rem 0;
  font-size: 1rem;
  letter-spacing: 1px;
  border-radius: var(--radius);
  margin: 2rem 2.5rem 2rem 2.5rem;
  box-shadow: 0 1px 14px #e6d3b355;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 950px) {
  main {
    max-width: 100vw;
    margin-left: 220px;
    width: calc(100% - 220px);
  }
  .sidebar {
    width: 220px;
    min-width: 170px;
    padding: 1.2rem 0.7rem 1rem 0.7rem;
  }
}

@media (max-width: 750px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    min-width: 0;
    height: auto;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0.7rem 0.7rem 0.5rem 0.7rem;
    border-radius: 0;
    box-shadow: 0 2px 12px #e6d3b360;
    z-index: 999;
  }
  .profile {
    flex-direction: row;
    align-items: center;
    margin-bottom: 0;
    gap: 0.7em;
  }
  .profile-pic {
    width: 46px;
    height: 46px;
    margin-bottom: 0;
    margin-right: 0.5em;
  }
  .profile h1 {
    font-size: 1.1rem;
    margin: 0;
    letter-spacing: 1px;
  }
  .profile .role {
    font-size: 0.96rem;
  }
  .sidebar nav ul {
    flex-direction: row;
    gap: 0.6em;
    margin: 0 0 0 1em;
  }
  .sidebar nav ul li a {
    font-size: 1em;
    padding: 0.25em 0.9em;
  }
  .socials {
    margin-top: 0;
    margin-left: auto;
    gap: 0.7em;
  }
  main {
    margin-left: 0;
    width: 100vw;
    padding-top: 72px;
  }
  .section {
    padding: 2.2rem 0.7rem 1.5rem 0.7rem;
    max-width: 100vw;
  }
  #about.section.card,
  #contact.section.card {
    border-radius: 1.1rem;
    border-width: 4px;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }
  .projects-grid {
    flex-direction: column;
  }
}

/* For very small devices */
@media (max-width: 450px) {
  .profile h1 { font-size: 0.98rem; }
  .sidebar nav ul li a { font-size: 0.93em; }
  .section, footer { padding-left: 0.3em; padding-right: 0.3em; }
}
