:root {
    --dark: #32292F;
    --neutral: #F5F3EF;
    --soft: #FFF3E8;
    --accent: #F8333C;
    --navbar-height: 80px; /* desktop default */
}

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

body {
  font-family: 'Noto Sans', sans-serif;
  background: radial-gradient(circle at top, #5f524f, var(--dark));
  color: var(--neutral);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  padding: 4rem 6rem;
  gap: 4rem;
  padding-top: calc(var(--navbar-height) + 1rem); /* leaves 1rem gap under navbar */
}

.hero-text h1 {
  /* scale heading between 2.8rem on small screens and 4.4rem on large screens */
  font-size: clamp(2.8rem, 4vw, 4.4rem);
  color: var(--soft);
  letter-spacing: -0.03em;
  padding-top: 10%;
}

.hero p {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: var(--neutral);
  max-width: 700px;
  text-align: justify;
}

/* constrain hero content area so it can expand on wide screens */
header.hero {
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 6rem;
  padding-right: 6rem;
}

/* IMAGE WITH OVERLAY */
.hero-image {
  position: relative;
  /* size by height so the clamp controls the image size; max height 700px */
  height: clamp(320px, 50vh, 700px);
  aspect-ratio: 11 / 16;
  /* width is determined by aspect-ratio; ensure it never overflows the layout */
  max-width: 100%;
  border-radius: 30px;
  overflow: hidden;
  justify-self: center;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
  max-height: 700px;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(86, 73, 70, 0.75),
    rgba(248, 51, 60, 0.35)
  );
  mix-blend-mode: multiply;
}

/* SECTIONS */
section {
  padding: 6rem 6rem;
  max-width: 1300px;
  margin: auto;
}

section h2 {
  font-size: 2.2rem;
  color: var(--soft);
  margin-bottom: 2.5rem;
}

/* PROJECT CARDS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-align: justify;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.project-card h3 {
  color: var(--soft);
  margin-bottom: 0.6rem;
}

.tags {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tags span {
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.project-links {
  margin-top: 1.5rem;
}

.project-links a {
  color: var(--accent);
  font-weight: 600;
  margin-right: 1.2rem;
}

.timeline {
  max-width: 1fr;
}

.timeline-item {
  margin-bottom: 1.5rem;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.timeline-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--soft);
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--accent);
  white-space: nowrap;
}

.timeline-item p {
  margin: 0.25rem 0 0;
  color: var(--neutral);
  line-height: 1.5;
  text-align: justify;
}

/* FOOTER */
footer {
  padding: 3rem;
  text-align: center;
  color: #aaa;
}

/* NAVBAR */
.navbar {
  height: var(--navbar-height);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(50, 41, 47, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* layout: logo on the far left, nav choices in a defined right-hand area
    so they sit more centered but remain on the right */
.nav-inner {
  height: var(--navbar-height);
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  /* always keep comfortable page edge padding on both sides */
  padding: 0 1.25rem;
}

/* logo keeps a fixed left inset */
.logo {
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 2rem;
  color: var(--soft);
  padding-left: 0.5rem; /* explicit left padding for logo */
}
/* give the nav-links a fixed-ish area on the right so links are centered
    within that area (appears more centered but still on the right) */
.nav-links {
  margin-left: auto;          /* push the nav area to the right */
  display: flex;
  gap: 2rem;
  align-items: center;
  width: auto;                /* allow natural width */
  justify-content: center;    /* center links inside their area */
  padding-right: 0.75rem;     /* explicit right padding for nav items */
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-links li {
  list-style: none;
}

.nav-links a {
  color: var(--neutral);
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

/* BUTTON STYLES — accent colors with a subtle glow */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.9rem 1.4rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  margin-top: 20px;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #d32b2f);
  box-shadow: 0 8px 26px rgba(248, 51, 60, 0.18), 0 0 18px rgba(248, 51, 60, 0.12);
  border: 1px solid rgba(255,255,255,0.04);
}

.btn-primary:hover,
.btn-primary:focus {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(248, 51, 60, 0.26), 0 0 36px rgba(248, 51, 60, 0.18);
  outline: none;
}

/* updated secondary: soft filled base, accented border and subtle glow; inverts on hover */
.btn-secondary {
  color: var(--accent);
  background: rgba(248, 51, 60, 0.06);
  border: 1px solid rgba(248, 51, 60, 0.20);
  box-shadow: 0 6px 22px rgba(248, 51, 60, 0.10), 0 0 14px rgba(248, 51, 60, 0.06);
}

.btn-secondary:hover,
.btn-secondary:focus {
  transform: translateY(-3px);
  background: linear-gradient(135deg, rgba(248,51,60,0.14), rgba(216,41,41,0.08));
  color: #fff;
  box-shadow: 0 18px 44px rgba(248, 51, 60, 0.22), 0 0 40px rgba(248, 51, 60, 0.16);
  outline: none;
}

/* Push hero down so it doesn’t hide behind navbar */
.hero {
  padding-top: 6rem;
}

/* PDF modal */
.pdf-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.65);
  visibility: hidden;
  opacity: 0;
  transition: opacity .18s ease, visibility .18s;
  z-index: 1200;
}
.pdf-modal.open {
  visibility: visible;
  opacity: 1;
}
.pdf-modal .modal-panel {
  width: min(92vw, 1100px);
  height: min(90vh, 700px);
  background: #0f0f10;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
}
.pdf-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.pdf-modal .modal-title {
  color: var(--neutral);
  font-weight: 600;
}
.pdf-modal .modal-close {
  background: transparent;
  border: 0;
  color: var(--neutral);
  font-size: 1.1rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
}
.pdf-modal iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

/* CONTACT */
#contact {
  padding: 6rem 6rem;
}
#contact h2 {
  font-size: 2.2rem;
  color: var(--soft);
  margin-bottom: 2rem;
}
.contact {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}
.contact-list {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: 0;
}
.contact-list li {
  display: inline-flex;
}
.contact-list a {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .9rem;
  border-radius: 10px;
  color: var(--neutral);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.contact-list a .icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  color: var(--accent);
}
.contact-list a:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45), 0 0 24px rgba(248,51,60,0.08);
  background: linear-gradient(135deg, rgba(248,51,60,0.06), rgba(255,255,255,0.02));
  color: var(--soft);
}

/* MOBILE / RESPONSIVE TWEAKS */

/* general small-screen layout (phones / small tablets) */
@media (max-width: 900px) {
  :root { --navbar-height: 72px; }
  .hero {
    grid-template-columns: 1fr;
    padding: 3rem 1.5rem;
    gap: 2rem;
    align-items: start;
    padding-top: calc(var(--navbar-height) + 0.75rem); /* leaves 0.75rem gap under navbar */
  }

  .hero-image {
    height: clamp(220px, 40vh, 480px);
    border-radius: 20px;
  }

  .hero-text h1 {
    font-size: clamp(1.8rem, 6vw, 2.8rem);
  }

  .hero p {
    max-width: 100%;
  }

  .hero-actions {
    margin-top: 1.25rem;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 0.85rem 1rem;
    text-align: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  section {
    padding: 3rem 1.5rem;
  }

  .contact-list {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-inner {
    padding: 0.6rem 1rem;
  }

  .nav-links {
    width: auto;
    margin-left: 0;
    gap: 0.8rem;
    justify-content: center;
  }

  .timeline {
    padding: 0 0.5rem;
  }
}

/* narrower phones / phablets */
@media (max-width: 700px) {
  /* keep logo and links on one row, evenly spaced */
  .nav-inner {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    height: var(--navbar-height);
    padding: 0.4rem 1rem;
  }

  .logo {
    font-size: 1.35rem;
    padding: 0;
    flex: 0 0 auto;
  }

  .nav-links {
    margin-left: 0;
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex: 1 1 auto;            /* take remaining space */
    justify-content: space-between; /* evenly divide space between links */
    width: 100%;
  }

  .nav-links a {
    padding: 0.45rem 0.6rem;
  }

  .timeline-header h3 {
    font-size: 1rem;
  }

  .timeline-date {
    font-size: 0.9rem;
  }

  .contact-list {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-list a {
    justify-content: center;
    width: 100%;
  }
}

/* very small phones */
@media (max-width: 420px) {
  body {
    font-size: 15px;
  }

  .nav-inner {
    padding: 0.5rem 0.75rem;
  }

  .nav-links {
    gap: 0.5rem;
  }

  .hero-image {
    height: clamp(180px, 36vh, 360px);
  }

  section h2 {
    font-size: 1.6rem;
  }

  .project-card {
    padding: 1.25rem;
    border-radius: 14px;
  }

  .pdf-modal .modal-panel {
    width: 96vw;
    height: 94vh;
    border-radius: 8px;
  }

  footer {
    padding: 2rem;
  }
}

/* accessibility: touch target minimums on small screens */
@media (max-width: 600px) {
  .btn-primary, .btn-secondary, .contact-list a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

