/**************
 * Base & Layout
 **************/
:root {
  --brand: #0056b3;
  --bg: #f7f8fa;
  --text: #222;
  --card: #fff;
  --shadow: 0 2px 10px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/**************
 * Header
 **************/
.site-header {
  background: var(--brand);
  color: #fff;
  padding: 2rem 0 1.4rem;
  text-align: center;
}
.site-header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}
.site-header p {
  margin: .5rem 0 0;
  opacity: .9;
}

/**************
 * Sticky Top Nav
 **************/
.topnav {
  position: sticky;   /* makes it stick */
  top: 0;             /* stick to top */
  z-index: 1000;      /* above content */
  background: #ffffffd9; /* slight translucency */
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid #e9eef3;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.topnav .container {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  padding: .6rem 0;
  flex-wrap: wrap;
}
.topnav a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
  padding: .4rem .7rem;
  border-radius: .5rem;
}
.topnav a:hover,
.topnav a:focus {
  background: #e9f2ff;
  outline: none;
}

/**************
 * Sections
 **************/
.section {
  margin: 1.25rem auto;
  padding: 1.5rem;
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.section h2 {
  margin-top: 0;
  color: var(--brand);
  border-bottom: 2px solid var(--brand);
  padding-bottom: .4rem;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
}

/**************
 * Projects
 **************/
.project + .project { margin-top: 2rem; }
.project h3 { margin-bottom: .5rem; font-size: 1.15rem; }
.bullets { margin: .4rem 0 1rem; }
.bullets li { margin: .25rem 0; }

/**************
 * Responsive Gallery
 **************/
.gallery {
  display: grid;
  grid-template-columns: repeat( auto-fill, minmax(180px, 1fr) );
  gap: .7rem;
  margin-top: 1rem;
}
.gallery figure {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
  background: #fff;
  aspect-ratio: 4 / 3;           /* consistent tiles */
  display: block;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;              /* fill nicely without distortion */
  display: block;
  transition: transform .25s ease;
}
.gallery img:hover { transform: scale(1.035); }

/**************
 * Skills
 **************/
.skills-list { padding-left: 1.2rem; }
.skills-list li { margin: .35rem 0; }

/**************
 * Footer
 **************/
.site-footer {
  margin-top: 2rem;
  background: var(--brand);
  color: #fff;
  padding: 1rem 0;
  text-align: center;
}
.site-footer .to-top {
  display: inline-block;
  margin-left: .6rem;
  color: #fff;
  text-decoration: underline;
}

/**************
 * Small Screens
 **************/
@media (max-width: 600px) {
  .topnav .container { justify-content: space-between; }
  .topnav a { padding: .4rem .5rem; }
}
