/* styles.css */
body {
  font-family: "Inter", "Segoe UI", "Roboto", "Helvetica Neue", Arial,
    sans-serif;
  line-height: 1.7;
  margin: 0;
  padding: 0;
  background: #f6f8fa;
  color: #23272f;
  position: relative;
}
header {
  background: linear-gradient(90deg, #1e293b 0%, #334155 100%);
  color: #fff;
  padding: 2rem 0 1.2rem 0;
  text-align: center;
  position: relative;
  z-index: 1201;
  box-shadow: 0 2px 12px rgba(30, 41, 59, 0.07);
}
header h1 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f1f5f9;
}
header p {
  margin-top: 0.7rem;
  font-size: 1.1rem;
  color: #cbd5e1;
  font-weight: 500;
}
nav {
  background: #334155;
  color: #fff;
  display: flex;
  justify-content: center;
  padding: 0.7rem 0;
  font-size: 1.08rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(30, 41, 59, 0.04);
}
nav a {
  color: #f1f5f9;
  margin: 0 1.2rem;
  text-decoration: none;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  transition: background 0.18s, color 0.18s;
}
nav a:hover,
nav a:focus {
  background: #475569;
  color: #38bdf8;
  outline: none;
}
.container {
  padding: 2.2rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(30, 41, 59, 0.09);
}
.section {
  margin-bottom: 2.5rem;
}
.section h2 {
  border-bottom: 2px solid #38bdf8;
  padding-bottom: 0.5rem;
  margin-bottom: 1.2rem;
  font-size: 1.45rem;
  color: #1e293b;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.profile-image {
  display: block;
  margin: 0 auto 1.2rem;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid #e0e7ef;
  box-shadow: 0 2px 12px rgba(30, 41, 59, 0.1);
  object-fit: cover;
}
a.btn,
.btn {
  display: inline-block;
  background: linear-gradient(90deg, #38bdf8 0%, #0ea5e9 100%);
  color: #fff !important;
  padding: 0.7em 1.7em;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 400;
  margin-top: 1.2rem;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.08);
  transition: background 0.2s, box-shadow 0.2s;
  border: none;
}
a.btn:hover,
.btn:hover,
a.btn:focus,
.btn:focus {
  background: linear-gradient(90deg, #0ea5e9 0%, #38bdf8 100%);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.13);
  outline: none;
}
.skills-grid {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.skills-grid > div,
.skills-grid > ul {
  flex: 1 1 220px;
  min-width: 220px;
}
.skills-grid h3 {
  color: #0ea5e9;
  font-size: 1.08rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.skills-grid ul {
  margin: 0 0 1.2rem 0;
  padding-left: 1.2rem;
}
.skills-grid li {
  margin-bottom: 0.3rem;
  color: #334155;
  font-size: 1.01rem;
}
.experience-block {
  margin-bottom: 2.2rem;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 1.2rem 1.7rem;
  box-shadow: 0 1px 6px rgba(30, 41, 59, 0.04);
  border-left: 4px solid #38bdf8;
}
.experience-block h3 {
  margin-top: 0;
  margin-bottom: 0.3rem;
  font-size: 1.15rem;
  color: #0ea5e9;
  font-weight: 700;
}
.experience-block p {
  margin: 0 0 0.7rem 0;
  color: #475569;
  font-size: 1.01rem;
}
.experience-block ul {
  margin: 0 0 0.7rem 1.2rem;
  padding-left: 1.2rem;
}
.experience-block li {
  margin-bottom: 0.4rem;
  color: #23272f;
  font-size: 1.01rem;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
}
.gallery-item {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding-top: 75%;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(30, 41, 59, 0.08);
  background: #f8fafc;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.gallery-item:focus-within,
.gallery-item:hover {
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.13);
}
.gallery-item img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
  border-radius: 10px;
}
.gallery-item:hover img,
.gallery-item:focus-within img {
  transform: translate(-50%, -50%) scale(1.08);
}
.contact-info a {
  display: block;
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: #0ea5e9;
  font-weight: 500;
  font-size: 1.04rem;
  transition: color 0.2s;
  word-break: break-all;
}
.contact-info a:hover,
.contact-info a:focus {
  color: #334155;
  outline: none;
}
footer {
  background: #1e293b;
  color: #cbd5e1;
  text-align: center;
  padding: 1.2rem 0 1rem 0;
  margin-top: 2rem;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 -2px 12px rgba(30, 41, 59, 0.07);
}
.footer-content {
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.burger {
  display: none;
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  width: 38px;
  height: 38px;
  background: rgba(30, 41, 59, 0.97);
  border: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1300;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(30, 41, 59, 0.1);
  transition: background 0.2s;
}
.burger:focus {
  outline: 2px solid #38bdf8;
}
.burger span {
  display: block;
  width: 28px;
  height: 4px;
  margin: 4px 0;
  background: #38bdf8;
  border-radius: 2px;
  transition: all 0.3s;
}
.burger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 800px) {
  .burger {
    display: flex;
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
  }
  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #334155;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    display: none;
    z-index: 1500;
    box-shadow: 0 4px 16px rgba(30, 41, 59, 0.13);
  }
  nav.open {
    display: flex;
  }
  nav a {
    margin: 0.7rem 0;
    font-size: 1.1rem;
    width: 100%;
    text-align: center;
    padding: 0.7rem 0;
    border-bottom: 1px solid #475569;
  }
  nav a:last-child {
    border-bottom: none;
  }
  body {
    padding-top: 0;
  }
}
@media (max-width: 600px) {
  .burger {
    top: 0.7rem;
    right: 1rem;
  }
  nav {
    top: 48px;
  }
  .container {
    padding: 0.7rem;
  }
}
@media (max-width: 900px) {
  .container {
    padding: 1rem;
  }
  .skills-grid {
    flex-direction: column;
    gap: 1rem;
  }
}
@media (max-width: 600px) {
  header h1 {
    font-size: 1.5rem;
  }
  nav {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
  }
  nav a {
    margin: 0.3rem 0;
    font-size: 1rem;
  }
  .container {
    padding: 0.5rem;
  }
  .section {
    margin-bottom: 1.2rem;
  }
  .profile-image {
    width: 90px;
    height: 90px;
  }
  .gallery {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
}
@media (max-width: 400px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 41, 59, 0.92);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.lightbox::-webkit-scrollbar {
  display: none;
}
.lightbox-content {
  position: relative;
  max-width: 98vw;
  max-height: 98vh;
}
.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 2px 16px rgba(30, 41, 59, 0.18);
}
.lightbox .close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.3);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  text-align: center;
  line-height: 40px;
  transition: background 0.2s;
}
.lightbox .close:hover,
.lightbox .close:focus {
  background: rgba(56, 189, 248, 0.6);
  outline: none;
}

/* PDF slideshow styles */
.pdf-slideshow {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.ctrl {
  background: #0ea5e9;
  color: white;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}
.ctrl:disabled {
  opacity: 0.5;
  cursor: default;
}
.page-info {
  margin-left: 0.6rem;
  color: #334155;
  font-weight: 600;
}
.slide-container {
  /* Aim for a large A4-like viewing area while staying responsive */
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0f1724;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  padding: 1.2rem 0;
}
.slide-frame {
  /* Constrain the inner frame to an A4 aspect ratio (w:h = 1:1.414) */
  width: min(90vw, 820px); /* up to 820px wide or 90% viewport */
  aspect-ratio: 1 / 1.414; /* A4 portrait */
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(2, 6, 23, 0.6);
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.slide-frame canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  display: block;
}
.viewer-footer {
  text-align: center;
  color: #475569;
}

@media (max-width: 900px) {
  .slide-container {
    height: calc(100vh - 320px);
  }
}
@media (max-width: 600px) {
  .ctrl {
    padding: 0.4rem 0.6rem;
  }
  .slide-container {
    height: calc(100vh - 220px);
  }
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}
