/* ==========================================================
   style.css — controls how every page LOOKS.
   Change the colors below to restyle the whole site at once.
   ========================================================== */

:root {
  --bg: #fafaf9;          /* page background */
  --surface: #ffffff;     /* card background */
  --text: #1c1917;        /* main text color */
  --muted: #78716c;       /* softer, secondary text */
  --accent: #4f46e5;      /* highlight color for links and buttons */
  --border: #e7e5e4;      /* thin lines */
  --radius: 12px;         /* how rounded the corners are */
}

* {
  box-sizing: border-box;
}

/* Glide smoothly when a menu link is clicked, instead of jumping */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Top navigation bar ---------- */
header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;   /* keeps the menu stuck to the top while scrolling */
  top: 0;
  z-index: 10;
}

.nav {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

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

/* ---------- Main content area ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Each part of the page (Home, About, Contact) */
section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 4rem;  /* stops the sticky menu from covering the heading */
}

section:last-child {
  border-bottom: none;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 1.5rem;
}

h3 {
  font-size: 1.1rem;
  margin: 2rem 0 0.75rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.4rem;
  margin: 2.5rem 0 0.75rem;
}

p {
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 600px;
}

a {
  color: var(--accent);
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.button:hover {
  opacity: 0.85;
}

.button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ---------- Cards (the boxes on the home page) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 4rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

/* ---------- About page ---------- */
.about {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;   /* fills the circle without stretching the photo */
  border: 4px solid var(--surface);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.about-text {
  flex: 1;
  min-width: 260px;
}

.skills {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.9rem;
}

/* ---------- Social media links ---------- */
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s;
}

.socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.socials svg {
  width: 18px;
  height: 18px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin: 0 0 0.5rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

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

/* ---------- Contact form ---------- */
form {
  max-width: 520px;
  margin-top: 2rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

input,
textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  background: var(--surface);
}

input:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
