/* ===================================================================
   STYLE.CSS

   This file controls how your website LOOKS. It is already written
   for you. You do not need to change anything in here.

   Your job is to use the right class names in index.html. When you
   do, the styles below turn on automatically.

   If you want to experiment, look for the sections marked
   "TRY CHANGING THIS".
   =================================================================== */


/* ===================================================================
   1. COLORS AND SETTINGS

   These are variables. A variable is a nickname for a value. Change
   one here and it changes everywhere on the site at once.

   >>> TRY CHANGING THIS <<<
   --accent is the one colored thing on the page. Try:
     #2563eb  blue        #b91c1c  red
     #047857  green       #7c3aed  purple
     #c2410c  orange      #0f172a  plain black
   =================================================================== */
:root {
  --bg:        #ffffff;
  --panel:     #ffffff;
  --hover:     #f7f7f8;
  --text:      #111214;
  --muted:     #626873;
  --line:      #e3e5ea;
  --accent:    #2563eb;

  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont,
          system-ui, Roboto, Helvetica, Arial, sans-serif;
}

/* DARK MODE. The button in the corner adds class="dark" to the body
   and these values take over. Same site, different colors. */
body.dark {
  --bg:     #0f1115;
  --panel:  #15181e;
  --hover:  #1b1f27;
  --text:   #f2f4f7;
  --muted:  #98a0af;
  --line:   #262b34;
  --accent: #7aa2ff;
}


/* ===================================================================
   2. PAGE BASICS
   =================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* The invisible column that keeps everything lined up. */
.wrap {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 28px;
}


/* ===================================================================
   3. NAVIGATION BAR
   HTML: <nav class="nav"> ... </nav>
   =================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 16px 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav .logo {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.2px;
  margin-right: auto;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.18s ease, background-color 0.18s ease;
}

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

.theme-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 14px;
  margin-left: 8px;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.theme-btn:hover {
  color: var(--text);
  background: var(--hover);
}


/* ===================================================================
   4. HERO, the area at the top with your name
   HTML: <header class="hero"> ... </header>
   =================================================================== */
.hero {
  padding: 120px 0 90px;
  border-bottom: 1px solid var(--line);
}

.hero .eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 62px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

.hero .tagline {
  font-size: clamp(18px, 2.4vw, 21px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 34px;
}


/* ===================================================================
   5. BUTTONS
   HTML: <a href="#about" class="btn">See More</a>
         <a href="#links" class="btn btn-ghost">My Links</a>
   =================================================================== */
.btn {
  display: inline-block;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 8px;
  margin-right: 10px;
  color: var(--bg);
  background: var(--text);
  border: 1px solid var(--text);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text);
  background: none;
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--hover);
  opacity: 1;
}


/* ===================================================================
   6. SECTIONS AND HEADINGS
   HTML: <section class="section" id="about"> <h2>About</h2> ...
   =================================================================== */
.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.section h2 {
  font-size: clamp(24px, 3.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 6px;
}

/* A short grey line you can put under a heading. */
.section .sub {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 30px;
}


/* ===================================================================
   7. CARDS AND THE GRID
   HTML: <div class="grid">
           <div class="card"> <h3>Grade</h3> <p>7th</p> </div>
         </div>
   The grid puts cards side by side on a computer and stacks them on
   a phone. You do not have to do anything for that to work.
   =================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  transition: border-color 0.18s ease, background-color 0.18s ease,
              transform 0.18s ease;
}

.card:hover {
  border-color: var(--muted);
  background: var(--hover);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--muted);
  margin-bottom: 4px;
}

.card p {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

/* A wide card that holds a paragraph of writing. */
.card-wide {
  padding: 26px 28px;
}

.card-wide p {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
}

/* Makes a card still look right when it is a link. */
a.card {
  display: block;
  text-decoration: none;
  color: inherit;
}

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


/* ===================================================================
   8. TAGS, the small rounded labels
   HTML: <div class="tags"> <span class="tag">Soccer</span> </div>
   =================================================================== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  cursor: default;
  transition: color 0.18s ease, border-color 0.18s ease,
              background-color 0.18s ease;
}

.tag:hover {
  color: var(--text);
  border-color: var(--muted);
  background: var(--hover);
}


/* ===================================================================
   9. QUOTE
   HTML: <blockquote class="quote">Text<span>Who said it</span></blockquote>
   =================================================================== */
.quote {
  border-left: 2px solid var(--accent);
  padding-left: 28px;
  font-size: clamp(20px, 3vw, 25px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.4px;
}

.quote span {
  display: block;
  margin-top: 16px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}


/* ===================================================================
   10. FOOTER
   HTML: <footer class="footer"> ... </footer>
   =================================================================== */
.footer {
  padding: 44px 0 70px;
  color: var(--muted);
  font-size: 15px;
}

.footer p + p {
  margin-top: 4px;
}


/* ===================================================================
   11. ANIMATIONS

   class="reveal"   makes something fade up when you scroll to it
   class="fade-in"  makes something fade up when the page loads
   class="delay-1"  makes a fade-in wait its turn (also delay-2, delay-3)
   =================================================================== */
html.js-on .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

html.js-on .reveal.seen {
  opacity: 1;
  transform: none;
}

.fade-in {
  opacity: 0;
  animation: rise 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}


/* ===================================================================
   12. PHONE SIZES
   =================================================================== */
@media (max-width: 600px) {
  .hero    { padding: 70px 0 60px; }
  .section { padding: 52px 0; }
  .nav a   { padding: 5px 9px; font-size: 14px; }
  .btn     { margin-bottom: 8px; }
}

/* Turns the movement off for anyone who prefers less motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html.js-on .reveal { opacity: 1; transform: none; }
  .fade-in { opacity: 1; }
}
