/* ==== General ==== */
html,
body {
  margin: 0;
  /* text-align: center;  */
  background: #C4D5BE;
  position: relative;
  color: #2a2d2b;
  overflow-x: hidden;
}

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

img,
video {
  max-width: 100%;
  height: auto;
}

nav {
  position: fixed;
  top: 8px;
  left: 8px;
  background: transparent;
  padding: 0;
  z-index: 10;
}

main {
  position: relative;
  z-index: 1;
  margin-top: 120px;
}


form input,
form textarea,
form button {
  width: 100%;
  margin-bottom: 16px;
  box-sizing:
    border-box;
}

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
  text-align: left;
  position: relative;
  z-index: 1;
}

section {
  padding: 40px 0;
}

p {
  margin-bottom: 20px;
  line-height: 1.7;
}

h1,
h2,
h3 {
  line-height: 1.3;
}

h1 {
  font-size: 3rem;
  margin-bottom: 8px;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 24px;
}

header {
  text-align: center;
}

header p {
  font-size: 1.2rem;
  opacity: 0.85;
  margin-top: 4px;
}

footer {
  text-align: center;
}

section:first-of-type {
  text-align: center;
}

.wrap form {
  padding: 24px;
  background: linear-gradient(135deg, #dfe8d6, #e6f0e4);
  border-radius: 12px;
  margin-top: 32px;
  margin-bottom: 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.links {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.links a {
  display: inline-block;
  padding: 8px 12px;
  text-decoration: none;
  color: #2a4d14;
  border: 1px solid #c3d6c1;
  border-radius: 8px;
}

.links a:hover,
.links a:focus-visible {
  background: #a3b18a;
  color: #fff;
  border-color: #3a3d42;
  outline: none;
}

/* ==== Decorations ====*/
body::after {
  content: "";
  position: fixed;
  top: -20px;
  right: -50px;
  width: 500px;
  height: 500px;
  background: url('/images/olive-branch.png') no-repeat;
  background-size: contain;
  z-index: 0;
}

body::before {
  content: "";
  position: fixed;
  top: -20px;
  left: -50px;
  width: 500px;
  height: 500px;
  background: url('/images/olive-branch.png') no-repeat;
  background-size: contain;
  transform: scaleX(-1);
  z-index: 0;
}

.section-panel {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 40px;
  padding: 50px 40px;
  max-width: 1300px;
  margin: 60px auto;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
}

.section-panel+#projects {
  margin-top: -50px;
}

.section-panel::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -75px;
  width: 200px;
  height: 200px;
  background: url('../images/olive-branch.png') no-repeat;
  background-size: contain;
  opacity: 0.5;
  transform: rotate(325deg);
  pointer-events: none;
  z-index: 3;
}

.section-panel::after {
  content: "";
  position: absolute;
  bottom: -70px;
  left: -75px;
  width: 200px;
  height: 200px;
  background: url('../images/olive-branch.png') no-repeat;
  background-size: contain;
  opacity: 0.5;
  transform: rotate(145deg);
  pointer-events: none;
  z-index: 3;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.split.reverse {
  direction: rtl;
}

.split.reverse>* {
  direction: ltr;
}

.cta-button {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 22px;
  background: #7b8e68;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.cta-button:hover {
  background: #5e6b50;
  transform: translateY(-2px);
}

.card ul {
  list-style: none;
  padding-left: 0;
}

.card ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
}

.card ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #7b8e68;
  font-weight: bold;
}

/* ==== Small scroll animation ====*/
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==== Services Page ====*/
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 1200px;
  margin: 12px auto 0;
}

.card {
  background: #dcedc8;
  border: 1px solid #c3d6c1;
  color: #2a2d2b;
  border-radius: 12px;
  padding: 16px;
  min-height: 240px;
  transition: background 120ms, border-color 120ms, color 120ms;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.card h3 {
  margin: 0 0 8px;
}

.card p {
  margin: 0 0 10px;
}

.card .tags {
  color: #9aa0a6;
  font-size: 14px;
}

/* ==== About Page ==== */

#skills .grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 1200px;
  margin: 12px auto 0;
}

#skills .card {
  padding: 12px;
  min-height: 220px;
}

#skills .card h3 {
  margin-bottom: 12px;
}

.decor {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.row {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #2b2d31;
  border-radius: 999px;
  background: #15171a;
  color: #e9e9ea;
  font-size: 14px;
}

#skills .decor .row {
  font-size: 18px;
  line-height: 1.4;
}

#skills .decor {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

/* ==== Contact Page ==== */
.form-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.form-row p {
  flex: 1;
  min-width: 200px;
  padding: 4px 0;
}

form p label {
  display: block;
  margin-bottom: 4px;
}

/* ==== Theme ==== */
a {
  color: #9ec1ff;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

nav a {
  display: inline-block;
  padding: 8px 12px;
  margin-right: 8px;
  font-size: 18px;
  color: #1f3610;
  border: 1px solid #a3b18a;
  background: #c4d5be;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

nav a:hover,
nav a:focus-visible {
  background: #7b8e68;
  border-color: #5e6b50;
  color: #fff;
  outline: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}


input,
textarea,
button {
  font: inherit;
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0;
  padding: 10px 12px;
  color: #2a2d2b;
  background: #e6f0e4;
  ;
  border: 1px solid #c3d6c1;
  border-radius: 8px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

input::placeholder,
textarea::placeholder {
  color: #5e6b50;
  font-style: italic;
}

input:focus,
textarea:focus,
button:focus {
  outline: 2px solid #7aa2ff;
  outline-offset: 2px;
  border-color: #7b8e68;
}

input:hover,
textarea:hover {
  border-color: #7b8e68;
  box-shadow: 0 0 4px rgba(123, 142, 104, 0.3);
}

button {
  cursor: pointer;
  background: #a3b18a;
  color: #fff;
  border: none;
  transition: background 0.2s, box-shadow 0.2s;
}

button:hover {
  background: #7b8e68;
  transform: scale(1.03);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

button:active {
  transform: scale(0.98);
}

/* ==== Mobile tweaks ==== */
@media (max-width: 480px) {
  p, h1, h2, h3 {
    word-wrap: break-word;
  }
  
  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  nav a {
    margin: 4px 0;
    display: inline-block;
    width: auto;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .wrap {
    padding: 0 10px;
  }

  input,
  textarea,
  button {
    font-size: 16px;
    padding: 12px 14px;
  }

  main {
    margin-top: 80px;
  }

  nav {
    top: 0;
    left: 0;
    right: 0;
    padding: 8px 0;
    text-align: center;
    background: #c4d5be;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .section-panel::before,
  .section-panel::after {
    display: none;
  }

  body::before,
  body::after {
    width: 150px;
    height: 150px;
    opacity: 0.08;
  }

  .section-panel {
    margin: 20px auto;
    padding: 20px 16px;
    border-radius: 24px;
    width: calc(100% - 20px);
  }

  body::before {
    top: 0;
    left: -40px;
  }

  body::after {
    top: 0;
    right: -40px;
  }

  .split {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .split > * {
    width: 100%;
    min-width: 0;
  }

  .split img {
    order: 2;
    width: 100%;
    height: auto;
    display: block;
  }

  .split > div {
    order: 1;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  p {
    font-size: 1.05rem;
  }

  .section-panel {
    margin: 30px 16px;
    padding: 30px 20px;
    max-width: 100%;
    border-radius: 30px;
  }

  .section-panel::before,
  .section-panel::after {
    width: 120px;
    height: 120px;
    top: -40px;
    bottom: -40px;
    left: -30px;
    right: -30px;
  }

  nav {
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    text-align: center;
  }

  .form-row {
    flex-direction: column;
    gap: 16px;
  }

  .wrap {
    max-width: 100%;
    padding: 0 20px;
  }

  .split {
    gap: 30px;
  }

  body::before {
    left: -30px;
  }

  body::after {
    right: -30px;
  }
}