* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-primary);
  font-family: "Poppins", sans-serif;
  font-size: 1.1rem;
  color: var(--color-white);
  transition: all 0.4s ease-in-out;
  opacity: 0;
}

:root {
  --color-primary: #191d2b;
  --color-secondary: #27AE60;
  --color-white: #FFFFFF;
  --color-black: #000;
  --color-grey-2: #b2becd;
  --color-grey-4: #454e56;
  --color-grey-5: #2a2e35;
  --br-sm-2: 14px;
  --box-shadow-1: 0 3px 15px rgba(0,0,0,.3);
}

a {
  display: inline-block;
  text-decoration: none;
  color: inherit;
  font-family: inherit;
}

header {
  min-height: 100vh;
  color: var(--color-white);
  overflow: hidden;
  padding: 0 !important;
}

section {
  min-height: 100vh;
  width: 100%;
  position: absolute;
  left: 0;
  top: 0;
  padding: 4rem 18rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.container {
  display: none;
  transform: translateY(-100%) scale(0);
  transition: all 0.4s ease-in-out;
  background-color: var(--color-primary);
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.active {
  display: block;
  animation: appear 1s ease-in-out;
  transform: translateY(0) scaleY(1);
}
@keyframes appear {
  0% {
    transform: translateY(-100%) scaleY(0);
  }
  100% {
    transform: translateY(0) scaleY(1);
  }
}

.controls {
  position: fixed;
  z-index: 10;
  top: 50%;
  right: 3%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
}
.controls .control {
  padding: 1rem;
  cursor: pointer;
  background-color: var(--color-grey-4);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.7rem 0;
  box-shadow: var(--box-shadow-1);
  text-decoration: none;
  color: inherit;
}
.controls .control i {
  font-size: 1.2rem;
  color: var(--color-grey-2);
  pointer-events: none;
}
.controls .active-btn {
  background-color: var(--color-secondary);
  transition: all 0.4s ease-in-out;
}
.controls .active-btn i {
  color: var(--color-white);
}

/*Header-content*/
.header-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  min-height: 100vh;
  gap: 2rem;
  align-items: center;
}
.header-content .left-header {
  display: flex;
  align-items: center;
  position: relative;
  justify-content: center;
}
.header-content .left-header .h-shape {
  transition: all 0.4s ease-in-out;
  width: 65%;
  height: 100%;
  background-color: var(--color-secondary);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  -webkit-clip-path: polygon(0 0, 46% 0, 79% 100%, 0% 100%);
          clip-path: polygon(0 0, 46% 0, 79% 100%, 0% 100%);
}
.header-content .left-header .image {
  border-radius: var(--br-sm-2);
  height: auto;
  width: auto;
  max-width: 68%;
  margin-left: 4rem;
  background-color: var(--color-black);
  transition: all 0.4s ease-in-out;
  box-shadow: var(--box-shadow-1);
}
.header-content .left-header .image img {
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  transition: all 0.4s ease-in-out;
  filter: grayscale(100%);
}
.header-content .left-header .image img:hover {
  filter: grayscale(0);
}
.header-content .right-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 18rem;
  padding-left: 2rem;
}
.header-content .right-header .name {
  font-size: 3rem;
  margin-bottom: 2rem;
  line-height: 1.2;
}
.header-content .right-header .name span {
  color: var(--color-secondary);
}
.header-content .right-header p {
  margin: 1.5rem 0;
  line-height: 2rem;
  text-align: justify;
  hyphens: auto;
}

/* Skills Blurb */
.skills-blurb {
  margin: 1rem 0 2rem 0;
  padding: 1.5rem;
  background-color: var(--color-grey-5);
  border-radius: var(--br-sm-2);
  border-left: 4px solid var(--color-secondary);
}

.skills-blurb h3 {
  color: var(--color-secondary);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.skills-content {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skill-category {
  color: var(--color-grey-2);
  font-size: 0.9rem;
  line-height: 1.4;
}

.skill-category strong {
  color: var(--color-white);
  font-weight: 600;
}

.port-text {
  padding: 2rem 0;
  text-align: center;
  font-size: 1.1rem;
  color: var(--color-grey-2);
  margin-bottom: 1rem;
}

.portfolio-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
  padding: 2rem 0;
  max-width: 1200px;
  margin: 0 auto;
  justify-items: center;
}

.portfolio-item {
  position: relative;
  border-radius: var(--br-sm-2);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  box-shadow: var(--box-shadow-1);
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.portfolio-item .image {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: hidden;
}

.portfolio-item .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease-in-out;
}

.portfolio-item:hover .image img {
  transform: scale(1.1);
}

.hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(39, 174, 96, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: all 0.3s ease-in-out;
  color: var(--color-white);
  text-align: center;
  padding: 2rem;
}

.portfolio-item:hover .hover-overlay {
  opacity: 1;
}

.hover-overlay h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.hover-overlay p {
  font-size: 1rem;
  opacity: 0.9;
}

/*Independed components*/
.btn-con {
  display: flex;
  align-self: flex-start;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.main-btn {
  border-radius: 30px;
  color: inherit;
  font-weight: 600;
  position: relative;
  border: 1px solid var(--color-secondary);
  display: flex;
  align-items: center;
  background-color: var(--color-grey-4);
  transition: all 0.3s ease-in-out;
  overflow: hidden;
  text-decoration: none;
}

.main-btn:hover {
  background-color: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
  color: var(--color-white);
}

.main-btn .btn-text {
  padding: 0 2rem;
  transition: all 0.3s ease-in-out;
  color: var(--color-white);
}

.main-btn .btn-icon {
  background-color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 1rem;
  transition: all 0.3s ease-in-out;
  color: var(--color-white);
}

.main-btn:hover .btn-icon {
  background-color: var(--color-white);
  color: var(--color-secondary);
}

.main-title {
  text-align: center;
  margin-bottom: 3rem;
  padding: 0 1rem;
}
.main-title h2 {
  position: relative;
  text-transform: uppercase;
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.main-title h2 span {
  color: var(--color-secondary);
}

/* Project Modals */
.project-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  overflow-y: auto;
}

.modal-content {
  background-color: var(--color-primary);
  margin: 2% auto;
  padding: 2rem;
  border-radius: var(--br-sm-2);
  width: 90%;
  max-width: 1000px;
  position: relative;
  color: var(--color-white);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-grey-2);
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--color-white);
}

.modal-content .project-header {
  margin-bottom: 2rem;
  text-align: center;
}

.modal-content .project-header .header-title-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.modal-content .project-header h1 {
  font-size: 2.5rem;
  color: var(--color-secondary);
  margin: 0;
}

.modal-content .project-header .github-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  background-color: var(--color-grey-5);
  border: 2px solid var(--color-secondary);
  border-radius: 25px;
  transition: all 0.3s ease;
  color: var(--color-secondary);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
  font-weight: 500;
}

.modal-content .project-header .github-link:hover {
  background-color: var(--color-secondary);
  color: var(--color-white);
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.modal-content .project-header .github-link i {
  font-size: 1.2rem;
}

.modal-content .project-header .github-link .github-text {
  font-size: 0.9rem;
  font-weight: 600;
}

.modal-content .project-category {
  font-size: 1.2rem;
  color: var(--color-grey-2);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-content .project-image {
  text-align: center;
  margin-bottom: 3rem;
}

.modal-content .project-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--br-sm-2);
  box-shadow: var(--box-shadow-1);
}

.modal-content .project-description {
  line-height: 1.8;
}

.modal-content .project-description h2 {
  color: var(--color-secondary);
  margin: 2rem 0 1rem 0;
  font-size: 2rem;
}

.modal-content .project-description h3 {
  color: var(--color-grey-2);
  margin: 1.5rem 0 0.5rem 0;
  font-size: 1.3rem;
}

.modal-content .project-description p {
  margin-bottom: 1rem;
}

.modal-content .project-description ul, .modal-content .project-description ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.modal-content .project-description li {
  margin-bottom: 0.5rem;
}

.modal-content .project-description code {
  background-color: var(--color-grey-5);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}

.modal-content .download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.modal-content .download-buttons .main-btn {
  flex: 1 1 0;
  min-width: 200px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  box-sizing: border-box;
  background-color: var(--color-grey-4);
  border: 1px solid var(--color-secondary);
  border-radius: 30px;
}

.modal-content .download-buttons .main-btn .btn-text {
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.2;
  color: var(--color-white);
  display: block;
  width: 100%;
}

.modal-content .download-buttons .main-btn .btn-icon {
  background-color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0.5rem;
  min-width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.modal-content .download-buttons .main-btn:hover {
  background-color: var(--color-secondary);
}

/* Contact Section */
.contact-info {
  margin-top: 4rem;
  padding: 3rem 0;
  border-top: 2px solid var(--color-grey-4);
}

.contact-info h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  color: var(--color-white);
}

.contact-info h2 span {
  color: var(--color-secondary);
}

.contact-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
  background-color: var(--color-grey-5);
  border-radius: var(--br-sm-2);
  border-left: 4px solid var(--color-secondary);
  transition: all 0.3s ease-in-out;
}

.contact-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-1);
}

.contact-item i {
  font-size: 2.5rem;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

.contact-details h3 {
  color: var(--color-white);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.contact-details p {
  color: var(--color-grey-2);
  font-size: 1rem;
  margin: 0;
}

.contact-details a {
  color: var(--color-grey-2);
  text-decoration: none;
  transition: color 0.3s ease-in-out;
}

.contact-details a:hover {
  color: var(--color-secondary);
}

.contact-details small {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  display: block;
  transition: all 0.3s ease-in-out;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 1432px) {
  section {
    padding: 4rem 11rem;
  }
  
  .header-content .right-header {
    padding-right: 9rem;
  }
}

@media screen and (max-width: 1250px) {
  .portfolio-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .header-content .right-header {
    padding-right: 6rem;
  }
}

@media screen and (max-width: 1070px) {
  section {
    padding: 4rem 6rem;
  }
  
  .main-title h2 {
    font-size: 3.5rem;
  }
  
  .main-title h2 span {
    font-size: 3.5rem;
  }
}

@media screen and (max-width: 970px) {
  section {
    padding: 4rem 3rem;
  }
  
  .header-content {
    grid-template-columns: repeat(1, 1fr);
    gap: 3rem;
    padding-bottom: 6rem;
  }
  
  .header-content .left-header .h-shape {
    display: none;
  }
  
  .header-content .left-header .image {
    width: 80% !important;
    margin: 0 auto !important;
    max-width: 400px;
  }
  
  .header-content .right-header {
    padding-right: 0 !important;
    padding-left: 0;
    width: 100%;
    text-align: center;
  }
  
  .header-content .right-header .name {
    font-size: 2.5rem !important;
    text-align: center;
    margin-bottom: 1.5rem;
  }
  
  .header-content .right-header p {
    text-align: left;
    margin: 1.2rem 0;
    line-height: 1.8;
    padding: 0 1rem;
  }
  
  .skills-blurb {
    margin: 1rem 0 1.5rem 0;
    padding: 1.2rem;
  }
  
  .skills-blurb h3 {
    font-size: 1.1rem;
  }
  
  .skill-category {
    font-size: 0.85rem;
  }
  
  /* Contact info responsive */
  .contact-info {
    margin-top: 3rem;
    padding: 2rem 0;
  }
  
  .contact-info h2 {
    font-size: 2rem;
  }
  
  .contact-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  
  .contact-item {
    padding: 1.5rem;
  }
  
  .contact-item i {
    font-size: 2rem;
    margin-bottom: 0.8rem;
  }
  
  .btn-con {
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
  }
  
  .portfolio-gallery {
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    max-width: 500px;
    padding: 0 1rem;
  }
  
  .portfolio-item .image {
    height: 250px;
  }
  
  .controls {
    top: auto;
    bottom: 0;
    flex-direction: row;
    justify-content: center;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    background-color: var(--color-grey-5);
    padding: 1rem 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
  }
  
  .controls .control {
    margin: 0 0.5rem;
    transition: all 0.3s ease-in-out;
  }
  
  .controls .control:hover {
    transform: scale(1.1);
  }
}

@media screen and (max-width: 700px) {
  section {
    padding: 3rem 2rem;
  }
  
  .main-title h2 {
    font-size: 2.5rem;
  }
  
  .main-title h2 span {
    font-size: 2.5rem;
  }
  
  .header-content .right-header .name {
    font-size: 2.2rem !important;
  }
  
  .header-content .right-header p {
    font-size: 1rem;
    line-height: 1.7;
    padding: 0 0.5rem;
  }
  
  .portfolio-item .image {
    height: 200px;
  }
  
  .hover-overlay h3 {
    font-size: 1.3rem;
  }
  
  .hover-overlay p {
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 600px) {
  section {
    padding: 2rem 1.5rem;
  }
  
  .header-content {
    padding-bottom: 5rem;
  }
  
  .header-content .left-header .image {
    width: 90% !important;
    max-width: 300px;
  }
  
  .header-content .right-header .name {
    font-size: 2rem !important;
    margin-bottom: 1rem;
  }
  
  .header-content .right-header p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 1rem 0;
    padding: 0 0.5rem;
  }
  
  .skills-blurb {
    margin: 1rem 0.3rem 0 0.3rem;
    padding: 1rem;
  }
  
  .skills-blurb h3 {
    font-size: 1.1rem;
  }
  
  .skill-category {
    font-size: 0.8rem;
  }
  
  /* Contact info responsive */
  .contact-info {
    margin-top: 2.5rem;
    padding: 1.5rem 0;
  }
  
  .contact-info h2 {
    font-size: 1.8rem;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .contact-item {
    padding: 1.2rem;
  }
  
  .contact-item i {
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
  }
  
  .contact-details h3 {
    font-size: 1.1rem;
  }
  
  .contact-details p {
    font-size: 0.9rem;
  }
  
  .main-title h2 {
    font-size: 2rem;
  }
  
  .main-title h2 span {
    font-size: 2rem;
  }
  
  .port-text {
    font-size: 1rem;
    padding: 1.5rem 0;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .portfolio-item .image {
    height: 180px;
  }
  
  .portfolio-gallery {
    gap: 1.5rem;
    padding: 1rem 0;
  }
  
  .main-btn {
    font-size: 0.9rem;
  }
  
  .main-btn .btn-text {
    padding: 0 1.5rem;
  }
  
  .main-btn .btn-icon {
    padding: 0.8rem;
  }
  
  /* Modal improvements for mobile */
  .modal-content {
    margin: 1% auto;
    padding: 1.5rem;
    width: 95%;
  }
  
  .modal-content .project-header h1 {
    font-size: 2rem;
  }
  
  .modal-content .project-description h2 {
    font-size: 1.5rem;
  }
  
  .modal-content .project-description h3 {
    font-size: 1.1rem;
  }
  
  .modal-content .download-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .modal-content .download-buttons .main-btn {
    min-width: 100%;
    height: 60px;
  }
  
  .modal-content .download-buttons .main-btn .btn-text {
    font-size: 0.85rem;
  }
  
  .close-modal {
    top: 0.5rem;
    right: 1rem;
    font-size: 1.5rem;
  }
  
  .btn-con {
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
  }
  
  .portfolio-gallery {
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    max-width: 500px;
    padding: 0 1rem;
  }
  
  .portfolio-item .image {
    height: 250px;
  }
  
  .controls {
    top: auto;
    bottom: 0;
    flex-direction: row;
    justify-content: center;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    background-color: var(--color-grey-5);
    padding: 1rem 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
  }
  
  .controls .control {
    margin: 0 0.5rem;
    transition: all 0.3s ease-in-out;
  }
  
  .controls .control:hover {
    transform: scale(1.1);
  }
}

@media screen and (max-width: 480px) {
  section {
    padding: 1.5rem 1rem;
  }
  
  .header-content {
    padding-bottom: 4rem;
  }
  
  .header-content .right-header .name {
    font-size: 1.8rem !important;
  }
  
  .header-content .right-header p {
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 0 0.3rem;
  }
  
  .skills-blurb {
    margin: 0.8rem 0.2rem 0 0.2rem;
    padding: 0.8rem;
  }
  
  .skills-blurb h3 {
    font-size: 1rem;
  }
  
  .skill-category {
    font-size: 0.75rem;
  }
  
  .main-title h2 {
    font-size: 1.8rem;
  }
  
  .main-title h2 span {
    font-size: 1.8rem;
  }
  
  .portfolio-item .image {
    height: 160px;
  }
  
  .controls .control {
    width: 45px;
    height: 45px;
  }
  
  .controls .control i {
    font-size: 1rem;
  }
}

/* Landscape orientation adjustments for mobile */
@media screen and (max-height: 600px) and (orientation: landscape) {
  .header-content {
    min-height: auto;
    padding: 2rem 0;
  }
  
  .header-content .right-header .name {
    font-size: 1.8rem !important;
    margin-bottom: 1rem;
  }
  
  .header-content .right-header p {
    margin: 0.8rem 0;
    line-height: 1.4;
  }
  
  .btn-con {
    margin-top: 1rem;
  }
  
  .portfolio-item .image {
    height: 150px;
  }
}

@media screen and (min-width: 1500px) {
  .container {
    max-width: 1600px;
  }
  .portfolio-gallery {
    max-width: 1600px;
    grid-template-columns: repeat(2, 1fr);
  }
  .portfolio-item .image {
    height: 450px;
  }
  .portfolio-item .image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    max-width: 100%;
    max-height: 100%;
  }
}