/* ================= Global ================= */

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

:root {
  --primary-color: #1B3C53;
  --primary-light: #254F6E;

  --text-dark: #0f0f0f;
  --text-muted: #6b6b6b;

  --border-light: #e6e6e6;
  --bg-light: #fafafa;
}

body {
  font-family: Georgia, "Times New Roman", Times, serif;
  background: #ffffff;
  color: var(--text-dark);

  line-height: 1.75;
  letter-spacing: 0.25px;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}


/* ================= Wrapper ================= */

.wrapper {
  max-width: 980px;
  margin: auto;
  padding: 0 32px;
}


/* ================= Navbar ================= */

.navbar {
  margin: 42px 0 70px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.8px;
}

nav a {
  margin-left: 32px;

  text-decoration: none;
  color: var(--primary-color);

  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.6px;

  transition: opacity 0.2s ease;
}

nav a:hover {
  opacity: 0.65;
}


/* ================= Intro ================= */

.intro {
  display: grid;
  grid-template-columns: 2fr 1fr;

  gap: 80px;
  margin-bottom: 50px;
}

.identity {
  font-size: 15px;
  letter-spacing: 2.4px;
  text-transform: uppercase;

  color: var(--primary-color);

  margin-bottom: 18px;
  font-weight: 600;
}

.intro h1 {
  font-style: italic;
  font-size: 27px;
  font-weight: 500;

  margin-bottom: 24px;
  line-height: 1.3;

  max-width: 620px;
}

.intro-left p {
  font-size: 17px;
  margin-bottom: 20px;
  max-width: 650px;
}


/* ================= Profile ================= */

.intro-right {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.intro-right img {
  width: 195px;
  height: 195px;

  object-fit: cover;
  border-radius: 50%;

  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}


/* ================= Sections ================= */

.section {
  max-width: 720px;
  margin: 70px auto;
}

.section h2 {
  font-size: 23px;
  font-weight: 600;

  margin-bottom: 28px;
  letter-spacing: 0.5px;
}

.section h3 {
  font-size: 18px;
  font-weight: 600;

  margin: 16px 0 6px;
}

.section p {
  font-size: 17px;
  margin-bottom: 14px;
}


/* ================= Quotes ================= */

blockquote {
  border-left: 2px solid var(--primary-color);

  padding-left: 20px;
  margin-bottom: 28px;

  color: var(--text-muted);
  font-style: italic;

  font-size: 16px;
  line-height: 1.65;
}


/* ================= Lists ================= */

.section ul {
  list-style: none;
  margin: 12px 0 24px;
  padding-left: 0;
}

.section ul li {
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--text-dark);

  position: relative;
  padding-left: 14px;
}

.section ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-light);
}


/* ================= Links ================= */

a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border 0.2s ease, opacity 0.2s ease;
}

a:hover {
  border-bottom: 1px solid var(--primary-light);
  opacity: 0.8;
}


/* ================= Footer ================= */

footer {
  margin: 120px 0 60px;

  text-align: center;
  color: var(--text-muted);

  font-size: 13px;
  letter-spacing: 0.6px;
}


/* ================= Projects ================= */

.project-block {
  margin-bottom: 18px;
  padding-bottom: 14px;

  border-bottom: 1px solid var(--border-light);
}

.project-block h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 10px;
}

.project-date {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-color);
  background-color: #f1f5f9;
  padding: 4px 10px;
  border-radius: 6px;
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  white-space: nowrap;
}

.project-desc {
  font-size: 15px;
  margin-bottom: 6px;
  line-height: 1.6;
}

.project-tech {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* ================= Image Rotation Gallery ================= */

.image-rotation-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
  margin: 40px auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  background: var(--bg-light);
}

.rot-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Prevents awkward cropping and preserves pixel quality */
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.rot-img.active {
  opacity: 1;
}

/* ================= Images ================= */

.project-image-center {
  display: flex;
  justify-content: center;
  margin: 26px 0;
}

.project-image-center img {
  width: 100%;
  max-width: 700px;

  height: auto;

  border-radius: 6px;

  background: var(--bg-light);
  padding: 6px;

  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}


/* ================= Contact Page ================= */

.contact-section {
  margin-top: 60px;
  margin-bottom: 70px;
}

.contact-section h3 {
  margin-top: 8px;
  margin-bottom: 4px;
}

.contact-section p {
  margin-bottom: 10px;
}

.contact-section p strong {
  display: block;
  margin-bottom: 2px;
}


/* ================= Mobile ================= */

@media (max-width: 900px) {

  .intro {
    grid-template-columns: 1fr;
    gap: 44px;
    text-align: center;
  }

  nav {
    display: none;
  }

  .intro-right img {
    width: 155px;
    height: 155px;
  }

  .section {
    margin: 80px auto;
  }

  .image-rotation-wrapper {
    height: 280px;
    /* responsive height */
  }

  footer {
    margin: 100px 0 50px;
  }
}

/* ================= Project Title with GitHub Button ================= */

.project-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;
  margin-bottom: 24px;
}

.project-title-bar h2 {
  margin-bottom: 0;
}

.github-btn {
  padding: 6px 14px;

  font-size: 13px;
  font-weight: 500;

  color: #ffffff;
  background: var(--primary-color);

  border-radius: 4px;

  text-decoration: none;
  letter-spacing: 0.4px;

  transition: opacity 0.2s ease, transform 0.2s ease;
}

.github-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}