:root {
  --bg-light: #f8fafc;
  --bg-soft: #e0f2fe;
  --text-dark: #0f172a;
  --text-mid: #334155;
  --text-soft: #64748b;
  --line: #e2e8f0;
  --white: #ffffff;
  --primary: #2563eb;
  --secondary: #0ea5e9;
  --gradient: linear-gradient(135deg, #2563eb, #0ea5e9);
  --radius: 12px;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(37, 99, 235, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 3vw, 3rem);
  text-align: center;
  margin-bottom: 2.25rem;
  font-weight: 700;
  position: relative;
}

.section-title::after {
  content: "";
  width: 42px;
  height: 3px;
  background: var(--primary);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -12px;
  border-radius: 10px;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  z-index: 999;
}

.nav-wrap {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.logo {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  line-height: 1;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #2d4669;
  border-radius: 10px;
  transition: all 0.2s ease;
  transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.menu-toggle:focus-visible {
  outline: 2px solid #9ec3ff;
  outline-offset: 2px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-mid);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

section {
  padding: 4rem 0;
  scroll-margin-top: 92px;
}

#home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-light), var(--bg-soft));
  padding-top: 7rem;
}

.hero-content {
  text-align: center;
  max-width: 860px;
  z-index: 2;
  position: relative;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.18;
  font-weight: 800;
  margin-bottom: 0.9rem;
}

.hero-title span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 1rem;
}

.hero-description {
  color: var(--text-soft);
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  border-radius: 8px;
  padding: 0.92rem 2rem;
  border: 2px solid transparent;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 185px;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-outline {
  background: var(--white);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.hero-bg-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.14;
  background: #7cb3ff;
}

.hero-bg-circle.one {
  width: 220px;
  height: 220px;
  top: 18%;
  left: 5%;
}

.hero-bg-circle.two {
  width: 300px;
  height: 300px;
  top: 8%;
  right: 9%;
}

.hero-bg-circle.three {
  width: 190px;
  height: 190px;
  left: 15%;
  bottom: 18%;
  background: #8ad6ff;
  opacity: 0.2;
}

#about {
  background: var(--white);
}

.about-text {
  max-width: 900px;
  margin: 0 auto;
  color: #334e6f;
  font-size: 1.02rem;
}

.about-text p + p {
  margin-top: 1rem;
}

.about-stats {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.stat {
  text-align: center;
  background: linear-gradient(135deg, #f4f9ff, #dceefe);
  border-radius: var(--radius);
  padding: 2rem;
}

.stat .num {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.stat .label {
  color: #5b6f8b;
  font-weight: 600;
}

#skills {
  background: linear-gradient(135deg, var(--bg-light), var(--bg-soft));
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
}

.skill-card {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.skill-card h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.6rem;
}

.skill-item + .skill-item {
  margin-top: 0.95rem;
}

.skill-row {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text-mid);
}

.skill-row span:last-child {
  color: var(--primary);
}

.skill-bar {
  height: 6px;
  border-radius: 10px;
  background: #d9e2ef;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 10px;
}

#projects {
  background: #ffffff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: linear-gradient(135deg, #f3f9ff, #e3f0ff);
  border-radius: var(--radius);
  padding: 1.6rem;
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.project-card h3 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.project-card p {
  color: #355174;
  margin-bottom: 1rem;
  font-size: 0.96rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  margin-bottom: 1rem;
}

.tag {
  background: var(--white);
  color: var(--primary);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.1rem;
}

.project-link {
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
}

.github-icon {
  color: #172b4d;
  text-decoration: none;
  font-size: 1.2rem;
  line-height: 1;
}

#experience {
  background: linear-gradient(135deg, var(--bg-light), var(--bg-soft));
}

.timeline {
  max-width: 840px;
  margin: 0 auto;
  position: relative;
  padding-left: 2.2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.8rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.15rem;
  top: 1rem;
  width: 9px;
  height: 9px;
  background: #fff;
  border: 3px solid var(--primary);
  border-radius: 50%;
  z-index: 2;
}

.exp-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.exp-card h3 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

.exp-meta {
  display: flex;
  gap: 0.95rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
  font-size: 1.3rem;
}

.exp-meta .company {
  color: var(--primary);
  font-weight: 700;
}

.exp-meta .period {
  color: #5d748f;
  font-weight: 500;
}

.exp-card ul {
  list-style: none;
}

.exp-card li {
  position: relative;
  color: #355174;
  padding-left: 1rem;
  margin: 0.25rem 0;
  font-size: 0.97rem;
}

.exp-card li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

#certifications {
  background: #ffffff;
}

.cert-grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.cert-card {
  background: linear-gradient(135deg, #f3f9ff, #e3f0ff);
  border-radius: var(--radius);
  padding: 0.85rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.cert-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #d7e2f0;
  margin-bottom: 0.8rem;
}

.cert-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

.cert-card p {
  color: #355174;
  font-size: 0.92rem;
  margin-bottom: 0.65rem;
}

.cert-source {
  color: #5b718c;
  font-size: 0.9rem;
  font-weight: 600;
}

.cert-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: auto;
}

.cert-link:hover {
  color: #0d8ddd;
}

#contact {
  background: #fff;
  padding-bottom: 4rem;
}

.contact-intro {
  text-align: center;
  color: #5b718c;
  margin-bottom: 2rem;
}

.contact-grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.info-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card {
  background: linear-gradient(135deg, #f3f9ff, #e3f0ff);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  text-align: left;
}

.info-top {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.info-card .icon {
  font-size: 1.25rem;
  margin-bottom: 0;
  width: 1.5rem;
  text-align: center;
  flex-shrink: 0;
}

.info-content {
  min-width: 0;
}

.info-card h4 {
  font-size: 1rem;
}

.info-card a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.92rem;
  word-break: break-word;
}

.form-col {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.form-col label {
  font-weight: 600;
  color: #223b5f;
  margin-bottom: 0.2rem;
  display: block;
}

.form-col input,
.form-col textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-col input:focus,
.form-col textarea:focus {
  border-color: var(--primary);
}

.submit-btn {
  margin-top: auto;
  border: none;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.contact-success {
  display: none;
  margin-top: 0.25rem;
  color: #0f5132;
  background: #d1e7dd;
  border: 1px solid #badbcc;
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  font-size: 0.92rem;
}

.contact-success.show {
  display: block;
}

.contact-error {
  display: none;
  margin-top: 0.25rem;
  color: #842029;
  background: #f8d7da;
  border: 1px solid #f5c2c7;
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  font-size: 0.92rem;
}

.contact-error.show {
  display: block;
}

.hidden-field {
  display: none;
}

footer {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  text-align: center;
  padding: 1.7rem 1rem;
}

.footer-main {
  font-weight: 700;
  color: #dde6f7;
  margin-bottom: 0.2rem;
}

.footer-copy {
  color: #9eb0cb;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.footer-socials a {
  color: #a9bdd8;
  text-decoration: none;
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(169, 189, 216, 0.45);
  transition: all 0.2s ease;
}

.footer-socials a:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

.footer-socials svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

@media (max-width: 1024px) {
  .skills-grid,
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .logo {
    font-size: 1.85rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #e7eef8;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-links.open {
    max-height: 420px;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    font-size: 0.95rem;
    padding: 0.95rem 1.3rem;
    border-bottom: 1px solid #edf3fb;
  }

  .nav-links a::after {
    display: none;
  }
}

@media (max-width: 768px) {
  .logo {
    font-size: 1.7rem;
  }

  .about-stats,
  .skills-grid,
  .projects-grid,
  .contact-grid,
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-item::before {
    left: -1.45rem;
  }

  .hero-description {
    font-size: 1.05rem;
  }

  .project-card,
  .exp-card {
    padding: 1.2rem;
  }
}
