* {
  box-sizing: border-box;
}

:root {
  --pink-light: #E7B5C0;
  --pink-deep: #C898B0;
  --blue-light: #BDD8E7;
  --blue-grey: #909DBD;
  --blue-deep: #7F9EBA;
  --navy: #17326D;
  --text: #1F2A44;
  --white: #FFFFFF;
  --page-bg: #F5F9FC;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--white);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  z-index: 1000;
}

.skip-link:focus {
  left: 12px;
}

/* Section jump position */
#about,
#projects,
#tools {
  scroll-margin-top: 52px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 7%;
  background: rgba(127, 158, 186, 0.78);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(31, 42, 68, 0.05);
}

.logo {
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--white);
}

.logo span {
  color: var(--pink-light);
  margin-left: 4px;
}

.main-nav ul {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--white);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.25px;
  padding-bottom: 3px;
}

.main-nav a:hover,
.main-nav a:focus,
.main-nav a.active-link {
  color: #fff4f7;
  border-bottom: 2px solid #fff4f7;
}

/* Homepage Hero */
.hero {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 110px 8% 72px;
  text-align: center;
  background:
    linear-gradient(
      rgba(189, 216, 231, 0.12),
      rgba(31, 42, 68, 0.28)
    ),
    url("images/IMG_7002.JPG");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-content {
  width: 100%;
  max-width: 1280px;
  margin-top: -38px;
}

.hero-avatar {
  width: 132px;
  height: 132px;
  object-fit: cover;
  object-position: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(31, 42, 68, 0.18);
  transform: translateY(-42px);
}

/* Smaller intro line */
.hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  line-height: 1.08;
  color: var(--white);
  letter-spacing: 0.5px;
  text-align: center;
}

.hero h1 span {
  color: var(--navy);
}

/* Larger main portfolio title */
.hero-text {
  margin: 24px auto 34px;
  font-size: clamp(2.2rem, 3.6vw, 3.6rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.enter-button,
.secondary-button {
  display: inline-block;
  min-width: 152px;
  padding: 11px 28px;
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(31, 42, 68, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.enter-button:hover,
.enter-button:focus,
.secondary-button:hover,
.secondary-button:focus {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(31, 42, 68, 0.2);
}

/* Home About section */
.home-about-section {
  min-height: 100vh;
  padding: 78px 8% 50px;
  background:
    linear-gradient(
      135deg,
      rgba(189, 216, 231, 0.96) 0%,
      rgba(231, 181, 192, 0.72) 52%,
      rgba(144, 157, 189, 0.88) 100%
    );
}

.home-about-heading {
  max-width: 900px;
  margin-bottom: 22px;
}

.home-about-heading h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4.3vw, 3.8rem);
  color: var(--navy);
  letter-spacing: 1px;
}

.home-about-panel {
  display: grid;
  grid-template-columns: minmax(250px, 360px) 1fr;
  gap: 30px;
  align-items: center;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 34px;
  padding: 28px;
  box-shadow: 0 20px 44px rgba(31, 42, 68, 0.12);
}

.home-about-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-about-image img {
  width: auto;
  max-width: 100%;
  max-height: 420px;
  border-radius: 28px;
  box-shadow: 0 18px 36px rgba(31, 42, 68, 0.14);
}

.home-about-text {
  background: rgba(255, 255, 255, 0.80);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 16px 34px rgba(31, 42, 68, 0.10);
}

.home-about-text h3 {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 3.5vw, 2.7rem);
  color: var(--navy);
}

.home-about-text p {
  margin: 0 0 16px;
  font-size: 1.04rem;
  color: var(--text);
  line-height: 1.7;
}

/* General content sections */
.content-section {
  padding: 70px 8%;
}

.section-heading {
  max-width: 900px;
  margin-bottom: 26px;
}

.section-label {
  margin: 0 0 8px;
  color: var(--pink-deep);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  font-size: 0.8rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  color: var(--navy);
}

/* Projects */
.projects-section {
  min-height: 100vh;
  padding: 58px 7% 56px;
  background:
    radial-gradient(
      circle at 12% 22%,
      rgba(189, 216, 231, 0.82) 0%,
      rgba(189, 216, 231, 0.42) 34%,
      transparent 56%
    ),
    radial-gradient(
      circle at 88% 24%,
      rgba(231, 181, 192, 0.72) 0%,
      rgba(231, 181, 192, 0.36) 36%,
      transparent 58%
    ),
    linear-gradient(
      115deg,
      #DCEAF1 0%,
      #EEF4F7 44%,
      #E8D2DD 100%
    );
}

.projects-heading {
  margin-bottom: 24px;
}

.projects-heading h2 {
  font-size: clamp(1.85rem, 3vw, 2.55rem);
}

.project-intro {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.project-card,
.tools-card {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(31, 42, 68, 0.08);
}

.project-card {
  padding: 16px;
  border: 1px solid rgba(189, 216, 231, 0.8);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 42px rgba(31, 42, 68, 0.13);
}

.project-preview {
  height: 165px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(127, 158, 186, 0.32);
  background:
    linear-gradient(
      135deg,
      rgba(189, 216, 231, 0.55),
      rgba(231, 181, 192, 0.24)
    );
}

.image-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
}

.project-preview iframe {
  width: 200%;
  height: 200%;
  border: 0;
  transform: scale(0.5);
  transform-origin: top left;
  pointer-events: none;
  background: #ffffff;
}

.project-card h3 {
  margin: 18px 0 10px;
  color: var(--navy);
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}

.project-description {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.55;
}

.project-card a {
  display: inline-block;
  width: fit-content;
  margin-top: auto;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}

.project-card a:hover,
.project-card a:focus {
  background: var(--pink-light);
}

/* Tools */
.tools-section {
  min-height: auto;
  margin: 0;
  padding: 42px 8% 24px;
  background:
    linear-gradient(
      135deg,
      #DBE9F3 0%,
      #E8E2EF 52%,
      #F0DCE6 100%
    );
}

.tools-card {
  padding: 34px;
  background: #F8F4F7;
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: 0 16px 32px rgba(31, 42, 68, 0.08);
}

.tools-card p {
  max-width: 980px;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 10px 8%;
  background: rgba(127, 158, 186, 0.88);
  color: var(--white);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1180px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .project-card {
    min-height: 400px;
  }
}

@media (max-width: 960px) {
  .site-header {
    position: static;
    flex-direction: column;
    gap: 10px;
    padding: 12px 7%;
  }

  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }

  #about,
  #projects,
  #tools {
    scroll-margin-top: 20px;
  }

  .hero {
    min-height: auto;
    padding-top: 90px;
  }

  .hero-content {
    margin-top: -8px;
  }

  .hero-avatar {
    transform: translateY(-18px);
  }

  .hero h1 {
    transform: translateX(0);
  }

  .hero-text {
    white-space: normal;
  }

  .project-grid,
  .home-about-panel {
    grid-template-columns: 1fr;
  }

  .home-about-image img {
    max-height: none;
    width: 100%;
  }

  .project-preview {
    height: 220px;
  }

  .project-card {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .content-section {
    padding: 64px 6%;
  }

  .hero {
    padding-left: 6%;
    padding-right: 6%;
  }

  .hero-avatar {
    width: 112px;
    height: 112px;
    transform: translateY(-12px);
  }

  .hero h1 {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
    transform: translateX(0);
  }

  .hero-text {
    font-size: clamp(2rem, 9vw, 3rem);
    white-space: normal;
  }

  .main-nav a {
    font-size: 0.9rem;
  }

  .home-about-section {
    padding: 64px 6% 56px;
  }

  .home-about-heading {
    margin-bottom: 22px;
  }

  .home-about-panel,
  .home-about-text {
    padding: 24px;
  }

  .projects-section {
    padding: 64px 6% 48px;
  }

  .project-preview {
    height: 190px;
  }

  .tools-section {
    padding: 42px 6% 24px;
  }

  .tools-card {
    padding: 30px;
  }
}