/* I described what color schemes and layout I wanted to github copilot, and it generated this CSS file, which I modified to fix flexbox issues, spacing issues, image sizings, and general layout issues that made the website not readable on mobile */

/* RESET & VARIABLES */
:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --muted: #6b7280;
  --text: #0f172a;
  --accent: #ffd54a; /* main color */
  --accent-soft: #fff6d8; /* accent color */
  --radius: 10px;
  --container: 1100px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

p { margin-top: 0.8rem; margin-bottom: 1rem; }
h1, h2, h3 { margin-top: 1.25rem; margin-bottom: 0.75rem; }

/* reduced top padding here to fix the the page gap in the report pages*/
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1rem 2rem; /* reduced from 3rem to 1rem top/bottom */
}

/* HEADER / NAV */
.site-header { border-bottom: 1px solid #e6e9ef; background: transparent; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.brand { font-weight: 800; color: var(--accent); text-decoration: none; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; padding: 0.5rem 0.6rem; border-radius: 8px; }
.nav-links a:hover { color: var(--text); background: rgba(255,213,74,0.16); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.25rem; }

/* HERO SECTION */
/* added padding-top here instead so only the home page gets a big padding */
.hero { 
  padding: 5rem 0 1rem 0; 
  display: flex; 
  flex-direction: column; 
  gap: 0.5rem; 
}
.hero h1 { margin: 0; font-size: 2rem; line-height: 1.1; }
.role { color: var(--muted); margin-top: 0.5rem; font-weight: 600; }
.bio { color: var(--muted); max-width: 60ch; margin: 0.75rem 0; }

/* fixed my photo so its size is reasonable on desktop and mobile */
.hero-photo { 
  display: flex; 
  align-items: center; 
  justify-content: flex-end; 
  max-width: 300px;
  width: 100%;
  flex: 0 0 auto;
}

.hero-photo img {
  display: block; 
  width: 100%; 
  height: auto; 
  max-width: 440px; 
  object-fit: contain;
  border-radius: 12px; 
  border: 6px solid rgba(255,213,74,0.14);
}

/* BUTTONS */
.button, .btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--accent), #ffc107);
  color: #081021;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(255,213,74,0.14);
}
.button.ghost { background: transparent; border: 1px solid #e9e9ef; box-shadow: none; }
.btn:hover, .button:hover { filter: brightness(0.98); transform: translateY(-1px); }

/* ABOUT SECTION */
.about { padding: 3.5rem 0; }
.skills { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; padding: 0; list-style: none; }
.skills li { background: var(--surface); padding: 0.45rem 0.75rem; border-radius: 999px; color: var(--muted); }

/* SEPARATORS */
.projects, .contact {
  position: relative;
  padding: 4rem 0;
  border-top: none;
}

/* changed width to make the mobile interface more readable */
.projects::before, .contact::before {
  content: "";
  display: block;
  width: 100%;           /* fill the screen */
  max-width: 800px;      
  height: 2px;
  background: var(--accent-soft);
  margin: 0 auto 4rem auto;
  border-radius: 2px;
}

/* PROJECTS SECTION */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.project-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(16,24,40,0.04);
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
  border-left: 4px solid transparent;
}
.project-card:hover { transform: translateY(-6px); border-left-color: var(--accent); box-shadow: 0 18px 40px rgba(16,24,40,0.08); }
.project-card img { width: 100%; height: auto; display: block; }
.card-body { padding: 1.25rem; }
.project-desc { color: var(--muted); margin: 0 0 0.65rem; }
.project-links a { color: var(--text); text-decoration: none; margin-right: 0.6rem; }

/* CONTACT SECTION */
.contact-links { list-style: none; padding: 0; margin: 0.5rem 0; color: var(--muted); }
.contact-links li { margin: 0.35rem 0; }
.contact-form { max-width: 560px; display: grid; gap: 0.6rem; }
.contact-form input, .contact-form textarea { padding: 0.6rem; border-radius: 8px; border: 1px solid #e6e9ef; width: 100%; }

/* FOOTER */
.site-footer { border-top: 1px solid #e6e9ef; padding: 2rem 0; color: var(--muted); }
.site-footer p { display: flex; justify-content: center; gap: 1rem; margin: 0; }

/* UTILITIES */
h2 { position: relative; padding-bottom: 0.6rem; }
h2::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  height: 8px; width: 88px;
  background: linear-gradient(90deg, var(--accent), #ffd700);
  border-radius: 6px;
}

/* fixes for mobile, github copilot helped me debug this */
@media (max-width: 900px) {
  /* reduced the side padding */
  .container { padding: 1rem 1.5rem; }

  /* centered the about me and image */
  .hero { 
    text-align: center; 
    padding-top: 2rem; 
  }

  /* navigation and footer changes */
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .project-grid { grid-template-columns: 1fr; }
  .site-footer p { flex-direction: column; align-items: center; }

  /* mobile image adjustments */
  .hero-photo { 
    max-width: 100%; 
    justify-content: center; /* center image on mobile */
    margin-top: 1.5rem;      /* add spacing between text and image */
  }
  .hero-photo img { max-width: 80%; }
}

@media (min-width: 901px) {
  .hero { flex-direction: row; align-items: center; gap: 2.5rem; }
  .hero .hero-text { flex: 1; }
  .hero-photo { flex: 0 0 auto; }
}