:root {
  --text-color: #1a1c20;
  --link-color: #4a76ee;
  --background-color: #eeeff1;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  max-width: 1400px;
  margin: 0 auto;
}

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

/* NAVBAR */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0 50px;
  height: 80px;
}

nav .left a {
  color: var(--text-color);
  font-size: 22px;
  font-weight: 600;
}

nav .right a {
  color: var(--text-color);
  margin: 0 10px;
}

nav .right a:last-child {
  color: var(--background-color);
  background-color: var(--text-color);
  padding: 5px 15px;
  border-radius: 5px;
}

nav .right a span {
  margin-left: 5px;
}

/* SECTION 1: Hero */
.hero-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 50px;
  margin: 50px 0;
  margin-bottom: 100px;
  gap: 40px;
}

.hero-section .text {
  flex: 5;
}

.hero-section .text h2 {
  font-size: 45px;
}

.hero-section .text .links {
  margin-top: 25px;
}

.hero-section .text .links a {
  display: inline-block;
  padding: 5px 10px;
  border: 2px solid var(--link-color);
  border-radius: 5px;
  margin-right: 10px;
  margin-bottom: 10px;
  transition: .1s;
}

.hero-section .text .links a:hover {
  color: var(--text-color);
  border: 2px solid var(--text-color);
}

.hero-section .headshot {
  flex: 2;
  display: flex;
  justify-content: right;
}

.hero-section .headshot img {
  width: 250px;
  border-radius: 10%;
}

/* SECTION 2: Skills */
.skills-section {
  padding: 0 50px;
  margin-bottom: 100px;
}

.skills-section h2 {
  text-align: center;
  font-size: 35px;
}

.skills-section .text {
  text-align: center;
  margin-bottom: 20px;
}

.skills-section .cells {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 30px;
}

.skills-section .cells .cell {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;

  width: 200px;
  padding: 10px 20px;
  margin: 10px;
  border: 1.5px solid #d3d3d3;
  border-radius: 5px;
}

.skills-section .cells .cell img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 2px;
}

.skills-section .cells .cell span {
  font-size: 18px;
}

/* SECTION 3: experience*/
.experience {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

.experience h2 {
  text-align: center;
  font-size: 2.2em;
  margin-bottom: 30px;
  color: #333;
}

.position{  
  background-color:black;
  color:white;
  padding: 20px 20px;
  border-radius: 15px; 
  /* width: fit-content; */
  margin-bottom: 20px;
}

.position p{
  margin: 5px 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-left: 20px;
  margin-bottom: 50px;
}


.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.card h3 {
  margin-top: 0;
  font-size: 1.2em;
  color:black;
}

.card .duration {
  font-size: 0.9em;
  color: #6b7280;
  margin-bottom: 10px;
  font-style: italic;
}

.card p {
  font-size: 0.95em;
  color: #374151;
}

/* SECTION 4: Contact */
.contact-section {
  padding: 0 50px;
  margin-bottom: 100px;
}

.contact-section h2 {
  font-size: 35px;
  text-align: center;
  margin-bottom: 40px;
}

.contact-section .group {
  display: flex;
  gap: 50px;
  background-color: #1a1c20;
  border-radius: 10px;
  padding: 20px 20px;
}

.contact-section .group .text {
  flex: 3;
  font-size:25px;
  margin-top: 250px;
  color: white;
  text-align: center;
}

.contact-section .group form {
  flex: 3;
  display: flex;
  flex-direction: column;
  background-color: white;
  padding:30px 3%;
  border-radius: 10px;
}

.contact-section .group form input,
.contact-section .group form textarea {
  font-family: 'Poppins', sans-serif;
  border: 2px solid var(--text-color);
  background-color: transparent;
  padding: 10px;
  margin-bottom: 15px;
  outline: none;
  resize: none;
  border-radius: 10px;
}

.contact-section .group form button {
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  color: #fff;
  background-color: var(--link-color);
  border: none;
  height: 50px;
  cursor: pointer;
  transition: .1s;
}

.contact-section .group form button:hover {
  filter: brightness(.9);
}

@media (max-width: 850px) {
  /* NAVBAR */
  nav .right a{
    padding: 0 5px;
    font-size: 22px;
  }

  nav .left a{
    font-size: 22px;
  } 

  nav .right a span {
    display: none;
  }

  /* SECTION 1: Hero */
  .hero-section .text h2 {
    font-size: 35px;
  }

  /* SECTION2 : Skills */  
  .skills-section h2
  {
    font-size:30px;
  }

  .skills-section .cells .cell
  {
    width: auto;
  }

  .skills-section .cells .cell img
  {
    width:20px;
    height:20px;
  }

  .skills-section .cells .cell span 
  {
    font-size:15px;
  }

}

@media (max-width: 740px) {
  /* SECTION 1: Hero */
  .hero-section {
    flex-direction: column-reverse;
  }

  .hero-section .headshot img {
    width: 150px;
  }

  /* SECTION 3: experience */

  .experience h2 {
    font-size: 1.8em;
  }

  .card {
    padding: 16px;
  }

  .card h3 {
    font-size: 1.1em;
  }

  .card p {
    font-size: 0.9em;
  }

  /* SECTION 4: Contact */
  .contact-section .group {
    flex-direction: column;
  }

  .skills-section h2
  {
    font-size:25px;
  }

  .skills-section .cells .cell img
  {
    width:15px;
    height:15px;
  }

  .skills-section .cells .cell span 
  {
    font-size:12px;
  }
}

@media (max-width: 620px) {
  /* NAVBAR */
  nav .right a{
    padding: 0 5px;
    font-size: 18px;
  }

  nav .left a{
    font-size: 18px;
  }


  nav .right a:last-child {
    color: var(--text-color);
    background-color: transparent;
    padding: 0;
  }


  /* SECTION 1: Hero */
  .hero-section {
    padding: 0 20px;
  }

  .hero-section .text h2 {
    font-size: 30px;
  }

  /* SECTION 2: Skills */
  .skills-section {
    padding: 0 20px;
  }

  /* SECTION 3: experience */
  .experience-section {
    padding: 0 20px;
  }

  /* SECTION 4: Contact */
  .contact-section {
    padding: 0 20px;
  }
}

@media (max-width: 520px) {

 nav{
    padding: 0 10px;
 }
  nav .right a{
    padding: 0 0;
    font-size: 15px;
    margin: 0px 4px;
  }

  nav .left a{
    font-size: 15px;
    padding: 0 0;
  }

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

  .experience {
    padding: 10px;
  }

  .card {
    padding: 14px;
  }
}