/* =========================================================
   style.css — main layout and section styling
   Colours, fonts and sizes all live in the :root block below,
   so changing one value there updates the whole site.
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@400;600;800&display=swap");

/* ---------- Variables (light mode) ---------- */
:root {
  --primary-color: #ffcd42;
  --secondary-color: #ffd35c;
  --bg-primary: #ffffff;
  --text-color: #222222;
  --text-muted: #5c5c5c;
  --text-color-two: #ffffff;
  --bg-secondary: #000000;
  --card-background: #f4f4f4;
  --border-color: #e6e6e6;

  --shadow: 0 10px 40px rgba(0, 0, 0, 0.12);

  --weight-small: 400;
  --weight-semibold: 600;
  --weight-bold: 800;

  --width-medium: 1100px;
}

/* ---------- Variables (dark mode) ---------- */
[data-theme="dark"] {
  --primary-color: #ffcd42;
  --secondary-color: #ffd35c;
  --bg-primary: #000000;
  --text-color: #ffffff;
  --text-muted: #a8a8a8;
  --text-color-two: #222222;
  --bg-secondary: #ffffff;
  --card-background: #111111;
  --border-color: #262626;
  --shadow: 0 2px 10px rgba(95, 95, 95, 0.2);
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

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

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

body {
  background: var(--bg-primary);
  color: var(--text-color);
  font-family: "Raleway", sans-serif;
  line-height: 1.5;
}

/* Keyboard focus outline (accessibility) */
a:focus-visible,
.hamburger:focus-visible,
label:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 3px;
}

/* ---------------- Navbar ---------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--bg-primary);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.navbar.scrolled {
  border-bottom-color: var(--border-color);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  width: 100%;
}

.navbar .nav-menu {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
}

.navbar .nav-link {
  margin: 0 1rem;
  font-size: 0.8rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.03em;
}

.navbar .nav-link:not(.btn):hover {
  color: var(--primary-color);
}

.navbar #logo img {
  display: block;
  width: 42px;
}

.navbar .btn {
  margin-right: 1.5rem;
}

.fas.fa-arrow-right {
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

/* Hamburger (mobile menu button) */
.hamburger {
  margin-bottom: 0.1rem;
  display: none;
}

.bar {
  display: block;
  width: 23px;
  height: 3px;
  margin: 4px auto;
  transition: all 0.3s ease-in-out;
  border-radius: 30px;
  background-color: var(--bg-secondary);
}

/* ---------------- Hero ---------------- */
#hero {
  display: flex;
  flex-direction: column;
}

#hero h1 {
  font-size: 2.2rem;
}

.profile-image {
  width: 150px;
  border-radius: 50%;
  animation: bounce 1.6s infinite alternate ease-in-out;
}

@keyframes bounce {
  from {
    transform: translateY(0px);
  }
  to {
    transform: translateY(-10px);
  }
}

.hero-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Quick stats under the hero */
.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3.5rem;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 2rem;
  font-weight: var(--weight-bold);
  line-height: 1.1;
}

.stat span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* Divider line between sections */
.division {
  width: 100%;
  height: 2px;
  background-color: var(--card-background);
  margin: 5.5rem 0 0;
}

.section {
  scroll-margin-top: 80px;
}

/* ---------------- Skills ---------------- */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.skill-group h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}

.skill-group h3 i {
  color: var(--primary-color);
  margin-right: 0.4rem;
}

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

.tags li {
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  border-radius: 30px;
  background: var(--card-background);
  border: 1px solid var(--border-color);
}

/* ---------------- Timeline ---------------- */
.timeline {
  border-left: 2px solid var(--card-background);
  margin: 1rem 0 3rem 0.5rem;
  padding-left: 2rem;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.53rem;
  top: 0.45rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-color);
}

.timeline-date {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.timeline-item h3 {
  font-size: 1.15rem;
  margin-top: 0.2rem;
}

.timeline-item h4 {
  font-size: 0.9rem;
  font-weight: var(--weight-semibold);
  color: var(--primary-color);
  margin-bottom: 0.4rem;
}

.timeline-item p {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 640px;
}

.courses-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}

.courses,
.honours {
  margin-top: 2.5rem;
}

.honour-list li {
  font-size: 0.92rem;
  color: var(--text-muted);
  padding: 0.55rem 0 0.55rem 1.4rem;
  position: relative;
  border-bottom: 1px solid var(--border-color);
}

.honour-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: 7px;
  height: 7px;
  background: var(--primary-color);
  border-radius: 50%;
}

.honour-list strong {
  color: var(--text-color);
}

/* ---------------- Projects ---------------- */
#projects {
  display: flex;
  flex-direction: column;
  margin: 0 auto 5rem;
  scroll-margin-top: 80px;
}

#projects .btn {
  align-self: center;
  margin: 2.5rem 0 0;
}

.project {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(250px, auto);
  grid-gap: 0.9rem;
}

/* ---------------- Awards ---------------- */
.awards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}

.award {
  padding: 1.4rem;
  border-radius: 6px;
  background: var(--card-background);
  border-left: 4px solid var(--border-color);
  transition: transform 0.25s ease-in-out;
}

.award:hover {
  transform: translateY(-4px);
}

.award-gold {
  border-left-color: var(--primary-color);
}

.award-place {
  font-size: 0.7rem;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.award-gold .award-place {
  color: var(--text-color);
  background: var(--primary-color);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}

.award-silver {
  border-left-color: #b8b8c0;
}

.award-silver .award-place {
  color: #1a1a1a;
  background: #c8c9ce;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}

.award-bronze {
  border-left-color: #c98a5e;
}

.award-bronze .award-place {
  color: #ffffff;
  background: #c17d4f;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}

.award h3 {
  font-size: 1rem;
  margin: 0.5rem 0 0.2rem;
}

.award p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------------- Footer ---------------- */
#footer {
  background: #111111;
  margin-top: 4rem;
}

#footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  min-height: 220px;
  text-align: center;
  padding: 3rem 2rem;
}

.footer-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

#footer a {
  font-size: 0.85rem;
  color: #fff;
}

#footer a:hover {
  color: var(--primary-color);
}

#footer .social {
  margin: 1.2rem 0 0.5rem;
}

#footer .social a {
  margin: 0 0.6rem;
  font-size: 1.3rem;
}

#footer p {
  font-size: 0.8rem;
  color: #b5b5b5;
}

/* ---------------- Responsiveness ---------------- */
@media (max-width: 1000px) {
  .project {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 670px) {
  .navbar .nav-menu {
    position: fixed;
    right: -100vw;
    top: 4.5rem;
    flex-direction: column;
    width: calc(80% - 10px);
    transition: 0.3s;
    box-shadow: var(--shadow);
    padding: 2rem;
    border-radius: 5px;
    align-items: flex-start;
  }

  .navbar .btn {
    margin: 1rem 0 0;
  }

  .nav-menu.active {
    right: 20px;
  }

  .nav-menu .nav-link {
    font-size: 0.9rem;
    margin: 0 0.2rem;
  }

  .nav-menu li {
    margin-bottom: 0.5rem;
    width: 100%;
  }

  .nav-menu .btn {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }

  .hamburger {
    display: block;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
  }

  .hamburger.active {
    border: 1px dotted gray;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

@media (max-width: 600px) {
  .project {
    grid-template-columns: 1fr;
  }

  .stats {
    gap: 1.75rem 2.5rem;
  }

  .hero-buttons .btn {
    width: 100%;
    text-align: center;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-item::before {
    left: -2.03rem;
  }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
