@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;500;600;700;800&display=swap');

:root {
  --primary-color: #52489C;
  --primary-dark: #1F252E;
}

* {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: #ffffff;
  color: #000;
  display: flex;
  justify-content: center;
  flex-direction: column;
}

/* General */
.container {
  padding: 0 8.4rem;
}
.img-w {
  width: 100%;
  height: auto;
}

/* Nav */
header {
  box-shadow: 0 4px 17px rgba(0, 0, 0, .1);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  opacity: 0;
  animation: leftSideAni 1s ease forwards;
}
.logo a {
  color: #000;
  text-decoration: none;
}
ul {
  display: flex;
  gap: .6rem;
  list-style-type: none;
}
li a {
  display: inline-block;
  padding: .3rem 1rem;
  color: #000;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 36px;
  line-height: 2;
  transition: .3s;
  opacity: 0;
  animation: navani .3s ease forwards;
  animation-delay: calc(.15s * var(--navAni));
}
li a.active,
li a:hover {
  color: var(--primary-color);
}
#click { display: none; }
.menu { display: none; }
.mode i {
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--primary-color);
  opacity: 0;
  animation: rightSideAni 1.5s ease forwards;
}

/* Hero / Main layout */
.main {
  padding: 6rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(277px, 1fr));
  row-gap: 2rem;
  column-gap: 6rem;
  align-items: center;
}
.main h3 { font-size: 1.5rem; animation: topSideAni 1s ease forwards; }
.main h1 { font-size: 4rem; font-weight: 600; animation: leftSideAni 1s ease forwards; animation-delay: 1s; }
.main p { line-height: 1.7; font-size: 1.15rem; animation: topSideAni 1.5s ease forwards; }
.social { display: flex; gap: 1.4rem; margin-top: 1.4rem; }
.social a {
  display: grid;
  place-items: center;
  background-color: var(--primary-color);
  color: #fff;
  font-size: 1.5rem;
  border-radius: 50%;
  padding: 0.39rem;
  transition: .3s;
}
.social a:hover {
  color: var(--primary-dark);
  box-shadow: 0 0 20px var(--primary-color);
}
.images {
  margin-left: auto;
  width: 350px;
  height: 350px;
  text-align: center;
  overflow: hidden;
  background-color: #52489C;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
/* Sections */
.section { padding: 6rem 0; text-align: center; }
.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 2rem;
}
/* About Section (2-column layout) */
#about .detail p {
  line-height: 1.7;
  font-size: 1.05rem;
  text-align: left;
}
/* Skills Grid (small cards) */
.skills-list {
  list-style: none;
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}
.skills-list li {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
  transition: transform .3s;
}
.skills-list li i {
  color: var(--primary-color);
  font-size: 1.3rem;
}
.skills-list li:hover { transform: translateY(-5px); }

/* Portfolio Grid (small cards with image) */
.portfolio-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
}
.portfolio-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
  transition: transform .3s;
}
.portfolio-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.portfolio-item h3 {
  font-size: 1rem;
  color: var(--primary-color);
  margin: .5rem 0.8rem 0.2rem;
}
.portfolio-item p {
  font-size: .85rem;
  margin: 0 0.8rem 0.8rem;
  line-height: 1.4;
}
.portfolio-item:hover { transform: translateY(-6px); }

/* Contact */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: auto;
}
.contact-form input,
.contact-form textarea {
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
}
.contact-form button {
  background: var(--primary-color);
  color: #fff;
  padding: 1rem;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
}
.contact-form button:hover { background: var(--primary-dark); }

/* Dark Mode */
.dark-mode { background: var(--primary-dark); color: #fff; }
.dark-mode .logo a, 
.dark-mode ul li a, 
.dark-mode .main h3, 
.dark-mode .main h1 { color: #fff; }
.dark-mode ul li a.active,
.dark-mode ul li a:hover { color: var(--primary-color); }
.dark-mode header { background: var(--primary-dark); }
.dark-mode .skills-list li,
.dark-mode .portfolio-item { background: #2a2f3a; }
.dark-mode .contact-form input,
.dark-mode .contact-form textarea {
  background: #2a2f3a;
  color: #fff;
  border: 1px solid #444;
}

/* Animations */
@keyframes leftSideAni { from{transform:translateX(-100px);opacity:0} to{transform:translateX(0);opacity:1} }
@keyframes navani { from{transform:translateY(100px);opacity:0} to{transform:translateY(0);opacity:1} }
@keyframes rightSideAni { from{transform:translateX(100px);opacity:0} to{transform:translateX(0);opacity:1} }
@keyframes topSideAni { from{transform:translateY(-100px);opacity:0} to{transform:translateY(0);opacity:1} }

/* Responsive */
@media screen and (max-width: 1024px) { .container { padding: 0 4.4rem; } }
@media screen and (max-width: 768px) { .container { padding: 0 1.6rem; } }
@media screen and (max-width:600px) {
  ul {
    background: var(--primary-dark);
    width: 100%;
    height: 100vh;
    position: absolute;
    flex-direction: column;
    text-align: center;
    top: 3.4rem;
    left: -100%;
  }
  .menu { display: block; font-size: 1.5rem; font-weight: bold; }
  #click:checked~ul { left: 0%; transition: all 0.3s ease; }
  .mode { position: absolute; right: 4rem; }
  .images { width: 100%; margin: auto; }
  .main { margin-top: 2rem; }
}
