/* ===========================================================
   style.css: our own CSS.
   Tailwind does most of the styling inside index.html.
   Here we create our OWN reusable classes (like .btn-primary)
   so we don't repeat the same long list of classes again and again.
   =========================================================== */

/* Tell the browser the order of the layers.
   Later layers win, so Tailwind "utilities" (like bg-indigo-500 or hidden)
   can always override our own "components" (like .btn-primary). */
@layer theme, base, components, utilities;

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;              /* smooth scroll for menu links */
}

body {
  font-family: "Inter", system-ui, sans-serif;
}

section {
  scroll-margin-top: 64px;              /* don't hide titles under the sticky navbar */
}

@layer components {

  /* ---------- Layout ---------- */
  /* Same width + side padding for every section */
  .container-page {
    max-width: 72rem;                     /* 1152px */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Soft grid pattern behind the hero */
  .hero-grid {
    background-image:
      linear-gradient(to right, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
  }

  /* ---------- Text ---------- */
  /* Small coloured label above section titles */
  .eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #4f46e5;
    margin-bottom: 0.75rem;
  }

  .section-title {
    font-size: clamp(1.875rem, 3vw, 2.5rem);   /* grows with the screen */
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #0f172a;
  }

  /* Gradient-coloured text */
  .text-gradient {
    background: linear-gradient(90deg, #4f46e5, #0ea5e9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .nav-link {
    color: #475569;
    transition: color 0.2s;
  }
  .nav-link:hover {
    color: #0f172a;
  }

  /* ---------- Buttons ---------- */
  .btn-primary,
  .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
  }

  .btn-primary {
    background: #0f172a;
    color: #ffffff;
  }
  .btn-primary:hover {
    background: #334155;
  }

  .btn-secondary {
    border: 1px solid #cbd5e1;
    color: #0f172a;
    background: #ffffff;
  }
  .btn-secondary:hover {
    border-color: #0f172a;
  }

  /* ---------- Cards ---------- */
  .card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(15, 23, 42, 0.25);
  }

  .card-title {
    margin-top: 1.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
  }

  .icon-box {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: #eef2ff;
    color: #4f46e5;
  }

  /* Project cards: image on top, text below */
  .project {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #ffffff;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .project:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(15, 23, 42, 0.25);
  }

  .project-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-bottom: 1px solid #e2e8f0;
  }

  .tag {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
  }

  /* ---------- Form ---------- */
  .input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #334155;
    background: #1e293b;
    color: #ffffff;
  }
  .input::placeholder {
    color: #94a3b8;
  }
  .input:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.35);
  }

}

/* Hide the default triangle on the phone menu */
summary::-webkit-details-marker {
  display: none;
}
