/* 1) Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root{
  --bg: #0b1020;
  --text: #e7e9ef;
  --muted: #b9bfd1;
  --card: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.12);
  --accent: #8cd1ff;
  --accent-2: #c4a8ff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,0.45), inset 0 0 0 1px var(--border);
  --wrap: min(1100px, 92vw);
  --grid-gap: 1.2rem;
}

body{
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% 0%, #0f1630 0%, #0b1020 45%, #090d19 100%),
              url('../images/webpage_background.jpeg') repeat;
  background-size: auto, 128px 128px;
  background-attachment: fixed;
}

/* Optional tint over the pattern for readability */
/*
body::before{
  content:"";
  position: fixed; inset: 0; pointer-events:none;
  background: rgba(0,0,0,.28);
}
*/

/* 2) Hero */
.hero{
  position: relative;
  background-image: url('../images/hero.jpg');
  background-size: cover;
  background-position: 50% 80%;
  background-repeat: no-repeat;
  height: clamp(280px, 42vw, 52vh);
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  border-bottom: 1px solid var(--border);
}
.hero-overlay{
  background: linear-gradient(180deg, rgba(10,13,25,0.7), rgba(10,13,25,0.45));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(6px) saturate(1.1);
}
.hero-overlay h1{
  font-weight: 700;
  font-size: clamp(28px, 4.6vw, 40px);
  letter-spacing: .2px;
}
.hero-overlay p{
  color: var(--muted);
  margin-top: .35rem;
  font-size: clamp(14px, 2.3vw, 18px);
}

/* 3) Projects — container + grid */
/* Wrap centers the grid and limits width; grid enforces max two columns on desktop */
.projects-wrap{
  width: var(--wrap);
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
}
.projects-grid{
  display: grid;
  gap: var(--grid-gap);

  /* Mobile-first: single column */
  grid-template-columns: 1fr;
}

/* From ~700px up: two columns, and never more than 2 */
@media (min-width: 700px){
  .projects-grid{
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    justify-content: center;
  }
}

/* 4) Project Card */
.project-card{
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  min-height: 100%;
}
.project-card:hover,
.project-card:focus-visible{
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.18);
  outline: none;
}

/* Thumbnail: consistent aspect, cover for a modern look */
.project-card .thumb{
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #000; /* in case image fails to load */
}

/* Title block pinned at bottom with subtle top divider */
.project-card h2{
  margin: 0;
  padding: .9rem 1rem;
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--text);
  border-top: 1px solid var(--border);

  /* clamp long titles to 2 lines */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: calc(1.25em * 2);
}

/* 5) Footer */
.site-footer{
  color: var(--muted);
  padding: 1rem 2rem;
  text-align: left;
  border-top: 1px solid var(--border);
}

/* 6) Extra polish on very large screens */
@media (min-width: 1200px){
  .hero{ height: min(34vh, 420px); }
  .projects-wrap{ padding-top: 1rem; }
}
