/* ================= RESET & VARIABLES ================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --ff-primary: "Source Sans Pro", sans-serif;
  --ff-secondary: "Source Code Pro", monospace;

  --fw-reg: 300;
  --fw-bold: 900;

  --clr-dark: #000;
  --clr-light: #fff;
  --clr-accent: #F5BB00;

  --fs-h1: 3rem;
  --fs-h2: 2.25rem;
  --fs-h3: 1.25rem;
  --fs-body: 1rem;

  --bs: 0.25em 0.25em 0.75em rgba(0,0,0,0.25),
        0.125em 0.125em 0.125em rgba(0,0,0,0.15);
}

@media (min-width: 800px) {
  :root {
    --fs-h1: 4rem;
    --fs-h2: 3rem;
    --fs-h3: 1.5rem;
    --fs-body: 1.125rem;
  }
}

/* ================= BACKGROUND DOT GRID (FIXED) ================= */

/*
  The dot grid lives on a ::before pseudo-element attached to <html>,
  positioned fixed so it stays locked to the viewport while cards scroll over it.
*/

html {
  scroll-behavior: smooth;
  /* Base background color — visible behind the pseudo-element */
  background-color: #000;
}

html::before {
  content: "";
  position: fixed;        /* locked to viewport — never scrolls */
  inset: 0;               /* covers full viewport */
  z-index: 0;             /* behind everything */
  pointer-events: none;   /* clicks pass straight through */
  background-image: radial-gradient(rgba(245, 187, 0, 0.22) 1.4px, transparent 1.4px);
  background-size: 28px 28px;
}

body {
  margin: 0;
  font-family: var(--ff-primary);
  color: var(--clr-light);
  background: transparent; /* lets the fixed dot layer show through */
  line-height: 1.6;
  padding-top: 70px; /* navbar offset */
  position: relative; /* establishes stacking context above the dots */
  z-index: 1;
}

/* ================= GLOBAL ELEMENTS ================= */

img {
  display: block;
  max-width: 100%;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.1;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

strong {
  font-weight: var(--fw-bold);
}

:focus {
  outline: 3px solid var(--clr-accent);
  outline-offset: 3px;
}

/* ================= BUTTONS ================= */

.btn {
  display: inline-block;
  padding: 0.6em 2em;
  background: var(--clr-accent);
  color: #000;
  text-decoration: none;
  font-weight: var(--fw-bold);
  letter-spacing: 1px;
  border-radius: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245,187,0,0.25);
}

/* ================= TOP NAVBAR ================= */

.top-nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(245,187,0,0.15);
  z-index: 2000;
}

.nav-container {
  max-width: 1100px;
  margin: auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--clr-accent);
}

/* Desktop nav */
.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--clr-light);
  font-weight: 600;
  transition: color 0.15s;
}

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

/* Mobile toggle */
.nav-toggle {
  display: none;
  font-size: 1.6rem;
  background: none;
  border: none;
  color: var(--clr-accent);
  cursor: pointer;
}

/* Mobile menu */
@media (max-width: 800px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #000;
    flex-direction: column;
    text-align: center;
    display: none;
    border-bottom: 1px solid rgba(245,187,0,0.15);
  }

  .nav-links a {
    padding: 1rem;
    border-top: 1px solid rgba(245,187,0,0.1);
  }

  .nav-open .nav-links {
    display: flex;
  }
}

/* ================= SECTIONS (GLASS PANELS) ================= */

section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(245,187,0,0.15);
  border-radius: 14px;
  backdrop-filter: blur(6px);
  /* Ensures sections sit above the fixed dot layer */
  position: relative;
  z-index: 1;
}

.section__title {
  border-left: 4px solid var(--clr-accent);
  padding-left: 0.6rem;
  margin-bottom: 1rem;
}

.section__subtitle {
  font-family: var(--ff-secondary);
  color: var(--clr-accent);
  margin-bottom: 1.5rem;
}

/* ================= INTRO ================= */

.intro {
  text-align: center;
  padding-top: 2rem;
}

.intro-grid {
  max-width: 1100px;
  margin: auto;
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 800px) {
  .intro-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.intro__img {
  max-width: 380px;
  justify-self: center;
  border-radius: 10px;
  box-shadow: var(--bs);
}

/* ================= SKILLS ================= */

.skills {
  display: grid;
  gap: 2rem;
  max-width: 1000px;
  margin: auto;
}

@media (min-width: 800px) {
  .skills {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skill {
  background: rgba(0,0,0,0.6);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(245,187,0,0.15);
}

/* ================= ABOUT ================= */

.about-grid {
  max-width: 1000px;
  margin: auto;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 800px) {
  .about-grid {
    grid-template-columns: 1fr 1.5fr;
  }
}

.about-photo img {
  width: 100%;
  max-width: 320px;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
  max-width: 600px;
}

.about-highlights {
  margin-top: 1.2rem;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
}

/* ================= PROJECTS ================= */

.portfolio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: auto;
}

@media (max-width: 900px) {
  .portfolio {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.portfolio__items {
  background: var(--clr-accent);
  border-radius: 8px;
  overflow: hidden;
}

.portfolio__item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portfolio__item:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.portfolio__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.portfolio__item:hover .portfolio__img {
  transform: scale(1.05);
}

/* Apple glass overlay */
.portfolio__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.2rem;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  color: white;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.portfolio__item:hover .portfolio__overlay {
  opacity: 1;
}

.portfolio__overlay h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.portfolio__overlay p {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
}

.my-description .btn {
  display: block;
  width: fit-content;
  margin: 2rem auto 0;
}

/* ================= RESUME ================= */

.resume-card {
  max-width: 1000px;
  margin: auto;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  overflow: hidden;
}

.resume-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.2rem;
  background: rgba(0,0,0,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.resume-title {
  font-family: var(--ff-secondary);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

.resume-buttons {
  display: flex;
  gap: 0.6rem;
}

.resume-btn {
  padding: 0.4rem 0.9rem;
  background: var(--clr-accent);
  color: #000;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.resume-viewer {
  height: 75vh;
  background: #111;
}

.resume-viewer embed {
  width: 100%;
  height: 100%;
  border: none;
}

/* ================= FOOTER ================= */

.footer {
  text-align: center;
  padding: 2rem;
  background: rgba(0,0,0,0.85);
  border-top: 1px solid rgba(245,187,0,0.15);
  position: relative;
  z-index: 1;
}

.footer a {
  color: var(--clr-accent);
  text-decoration: none;
  font-weight: var(--fw-bold);
}

.footer a:hover {
  text-decoration: underline;
}

.social-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-list__link {
  font-size: 1.5rem;
  color: var(--clr-light);
}

.social-list__link:hover {
  color: var(--clr-accent);
}