@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap");

:root {
  --first-color: #6291e4;
  --second-color: #8b5cf6;
  --black-color: #070b1d;
  --card-color: #101736;
  --white-color: #f4f6ff;
  --text-muted: #a7aed4;
  --body-font: 'Poppins', sans-serif;
  --h1-font-size: 2.5rem;
  --h2-font-size: 1.6rem;
  --normal-font-size: 0.95rem;
  --small-font-size: 0.85rem;
  --z-normal: 1;
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
}

@media screen and (min-width: 768px) {
  :root {
    --h1-font-size: 56px;
    --h2-font-size: 36px;
    --normal-font-size: 16px;
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 64px 0 0 0;
  font-family: var(--body-font);
  background: radial-gradient(circle at 80% 10%, #16204a 0%, var(--black-color) 55%);
  color: var(--white-color);
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2 { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

::selection { background: var(--first-color); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--black-color); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--first-color), var(--second-color)); border-radius: 8px; }

.bd-grid {
  max-width: 1200px;
  margin-left: 16px;
  margin-right: 16px;
}

/* ---------- Header ---------- */
.l-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background: rgba(7, 11, 29, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(98, 145, 228, 0.2);
}

.nav {
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.nav__list { text-align: center; }

.nav__item { margin-bottom: 32px; }

.nav__link {
  color: var(--text-muted);
  font-size: var(--normal-font-size);
  transition: color 0.3s ease;
}

.nav__link:hover,
.nav__link.active {
  color: var(--white-color);
}

.nav__menu li a::after {
  content: "";
  display: block;
  background: linear-gradient(90deg, var(--first-color), var(--second-color));
  width: 0%;
  height: 3px;
  margin: 4px auto 0;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.nav__menu li a:hover::after,
.nav__menu li a.active::after {
  width: 100%;
}

.nav__logo {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--white-color);
}

.logo-dot { color: var(--first-color); }

.nav__toggle {
  font-size: 26px;
  cursor: pointer;
}

.show { top: 64px !important; }

@media screen and (max-width: 768px) {
  .nav__menu {
    position: fixed;
    top: -100%;
    left: 0;
    background: linear-gradient(180deg, var(--black-color), #1b2a5e);
    width: 100%;
    padding: 32px 24px;
    border-radius: 0 0 20px 20px;
    transition: top 0.5s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  }
}

/* ---------- Layout ---------- */
.l-main {
  min-height: calc(100vh - 64px);
}

/* ---------- Home ---------- */
.home {
  display: grid;
  grid-template-columns: 1fr;
  align-content: space-around;
  row-gap: 37px;
  min-height: calc(100vh - 64px);
  padding: 32px 0;
}

.home__information {
  padding-left: 24px;
  border-left: 5px solid var(--first-color);
  z-index: var(--z-tooltip);
}

.home__pressent {
  font-size: var(--small-font-size);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.home__title {
  font-size: var(--h1-font-size);
  font-weight: 800;
  line-height: 1.15;
  margin: 8px 0;
}

.gradient-text {
  background: linear-gradient(90deg, var(--first-color), var(--second-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home__skill {
  font-size: var(--h2-font-size);
  color: var(--text-muted);
  font-weight: 600;
}

.home__img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 291px;
  z-index: var(--z-normal);
  left: 1050px;
}

.home__img img {
  border-radius: 24px 24px 0 0;
  box-shadow: 0 25px 60px rgba(98, 145, 228, 0.35);
}

.home__social {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 16px;
}

.home__social .icon { color: var(--white-color); transition: transform 0.3s ease, color 0.3s ease; }
.home__social .icon:hover { transform: translateY(-5px); color: var(--first-color); }

.home__social-icon { font-size: 24px; }

.home__copy {
  color: var(--text-muted);
  font-size: var(--small-font-size);
  font-weight: 400;
}

/* ---------- Sections ---------- */
.about, .yet, .portfolio, .ile, .exp, .edu, .cert {
  display: none;
  padding: 48px 16px;
  text-align: center;
}

.section__title {
  font-size: var(--h2-font-size);
  font-weight: 800;
  margin-bottom: 32px;
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: "";
  display: block;
  width: 60%;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--first-color), var(--second-color));
}

.section__subtitle { color: var(--text-muted); margin-bottom: 32px; }

.about__card {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card-color);
  border: 1px solid rgba(98, 145, 228, 0.2);
  border-radius: 16px;
  padding: 32px;
  text-align: left;
  line-height: 1.8;
  color: var(--text-muted);
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.about__card p { margin: 0 0 16px; }
.about__card p:last-child { margin-bottom: 0; }

.yet { text-align: center; }

.skill-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.skill-list li {
  background: var(--card-color);
  border: 1px solid rgba(98, 145, 228, 0.25);
  border-radius: 12px;
  padding: 18px 12px;
  font-weight: 600;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.skill-list li:hover {
  transform: translateY(-6px);
  border-color: var(--first-color);
  box-shadow: 0 12px 30px rgba(98, 145, 228, 0.25);
}

.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.prj {
  background: var(--card-color);
  border: 1px solid rgba(98, 145, 228, 0.2);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prj:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(14, 179, 255, 0.25);
}

.imgprj {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.prj:hover .imgprj { transform: scale(1.06); }

.prj p {
  padding: 14px;
  font-weight: 600;
  color: var(--white-color);
}

/* ---------- Timeline ---------- */
.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  text-align: left;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(var(--first-color), var(--second-color));
}

.timeline__item {
  position: relative;
  margin-bottom: 28px;
}

.timeline__dot {
  position: absolute;
  left: -26px;
  top: 22px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--first-color);
  border: 3px solid var(--black-color);
  box-shadow: 0 0 0 3px rgba(98, 145, 228, 0.4);
}

.timeline__card {
  background: var(--card-color);
  border: 1px solid rgba(98, 145, 228, 0.2);
  border-radius: 14px;
  padding: 22px 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.timeline__card:hover {
  transform: translateX(8px);
  border-color: var(--first-color);
  box-shadow: 0 14px 35px rgba(98, 145, 228, 0.2);
}

.timeline__date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--first-color);
  background: rgba(98, 145, 228, 0.12);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.timeline__card h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.timeline__card h4 {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.timeline__card ul {
  padding-left: 18px;
  list-style: disc;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.92rem;
}

/* ---------- Education & Certificates ---------- */
.edu__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.edu__card {
  background: var(--card-color);
  border: 1px solid rgba(98, 145, 228, 0.2);
  border-radius: 14px;
  padding: 24px;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.edu__card:hover {
  transform: translateY(-6px);
  border-color: var(--first-color);
  box-shadow: 0 14px 35px rgba(98, 145, 228, 0.2);
}

.edu__card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.edu__card p { margin: 0; color: var(--text-muted); font-weight: 400; }
.edu__gpa { margin-top: 8px !important; color: var(--first-color) !important; font-weight: 600 !important; }

.cert__list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cert__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-color);
  border: 1px solid rgba(98, 145, 228, 0.2);
  border-radius: 12px;
  padding: 16px 20px;
  font-weight: 600;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.cert__list li:hover {
  transform: translateX(8px);
  border-color: var(--first-color);
}

.cert__list ion-icon { font-size: 22px; color: var(--first-color); }

.cert__list span {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--first-color);
  background: rgba(98, 145, 228, 0.12);
  padding: 4px 12px;
  border-radius: 20px;
}

.ile__info {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 28px;
  color: var(--text-muted);
  font-weight: 600;
}

.ile__info ion-icon { color: var(--first-color); vertical-align: middle; margin-right: 6px; }

/* ---------- CV Button & Card ---------- */
.cv-button {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 28px;
  background: linear-gradient(90deg, var(--first-color), var(--second-color));
  color: #fff;
  font-weight: 700;
  border-radius: 30px;
  letter-spacing: 1px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cv-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(98, 145, 228, 0.45);
}

.cv-card {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 600px;
  margin: 0 auto 32px;
  background: var(--card-color);
  border: 1px solid rgba(98, 145, 228, 0.2);
  border-radius: 14px;
  padding: 20px 24px;
  text-align: left;
}

.cv-card > ion-icon {
  font-size: 40px;
  color: var(--first-color);
}

.cv-card h3 { margin: 0 0 4px; }
.cv-card p { margin: 0; color: var(--text-muted); font-size: 0.85rem; font-weight: 400; }
.cv-card .cv-button { margin-top: 0; margin-left: auto; padding: 10px 24px; }

/* ---------- Contact ---------- */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
  background: var(--card-color);
  border: 1px solid rgba(98, 145, 228, 0.2);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.contact__input-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.contact__input-container label {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.contact__input-container input,
.contact__input-container textarea {
  padding: 0.8rem 1rem;
  border: 1px solid rgba(98, 145, 228, 0.35);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--white-color);
  background-color: rgba(255,255,255,0.04);
  font-family: var(--body-font);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact__input-container input:focus,
.contact__input-container textarea:focus {
  outline: none;
  border-color: var(--first-color);
  box-shadow: 0 0 0 3px rgba(98, 145, 228, 0.25);
}

.contact__input-container input::placeholder,
.contact__input-container textarea::placeholder {
  color: #6b7394;
}

.contact__button {
  padding: 0.9rem;
  background: linear-gradient(90deg, var(--first-color), var(--second-color));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact__button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(98, 145, 228, 0.4);
}

/* ---------- Overlays ---------- */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 33.4%;
  height: 100%;
  z-index: var(--z-modal);
}

.first { background: linear-gradient(180deg, #6291e4, #4a6fd4); }
.second { background: linear-gradient(180deg, #4a6fd4, #3b56b8); left: 33.3%; }
.third { background: linear-gradient(180deg, #3b56b8, #2c449c); left: 66.6%; }

/* ---------- Desktop ---------- */
@media screen and (min-width: 768px) {
  body { margin: 0; }
  .l-main { min-height: 100vh; padding-top: 64px; }
  .nav { height: 64px; }
  .nav__list { display: flex; padding-top: 0; }
  .nav__item { margin-left: 48px; margin-bottom: 0; }
  .nav__toggle { display: none; }
  .home { align-content: center; }
  .home__social { flex-direction: row; padding-top: 128px; padding-bottom: 0; align-items: center; }
  .home__img { width: 553px; right: 5%; left: auto; }
}

@media screen and (min-width: 1200px) {
  .bd-grid { margin-left: auto; margin-right: auto; }
}

@media screen and (max-width: 768px) {
  .home { text-align: center; padding: 24px 16px; min-height: auto; }
  .home__information { padding-left: 0; border-left: none; border-top: 4px solid var(--first-color); padding-top: 16px; }
  .home__img { position: static; width: 80%; left: auto; margin: 0 auto; }
  .home__social { flex-direction: row; justify-content: center; padding-top: 16px; }
  .home__social-icon { font-size: 22px; }
  .about__card { padding: 20px; text-align: left; }
  .contact__form { width: 100%; padding: 20px; }
  .prj p { padding: 10px; }
}

@media screen and (max-width: 480px) {
  .home__title { font-size: 1.8rem; }
  .home__skill { font-size: 1rem; }
  .home__img { width: 90%; }
  .section__title { font-size: 1.4rem; }
  p { font-size: 0.85rem; line-height: 1.6; }

  .cv-card { flex-wrap: wrap; }
  .cv-card .cv-button { margin-left: 0; margin-top: 8px; }
}
