/* ========== Import Google Fonts ========== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Open+Sans:wght@300;400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* ========== CSS Variables ========== */
:root {
  --color-primary:   #c19a00;   /* Deep Gold accent */
  --color-accent:    #eadd29;   /* Bright gold accent */
  --color-bg:        #111111;   /* Page background */
  --color-text:      #ffffff;   /* Body text */
  --color-heading:   #dedfb3;   /* Headings */
  --spacing:         1.5rem;    /* Base spacing */
  --max-width:       1200px;    /* Content max-width */
}

/* ========== Reset & Global Styles ========== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Open Sans', Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 1rem;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  color: var(--color-heading);
  margin-bottom: 0.5em;
  line-height: 1.2;
}
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: var(--color-accent);
}
/* ========== Particle Background ========== */
#particle-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-color: var(--color-bg); /* fallback */
}

/* ========== Utility Container ========== */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing) 0;
}

/* ========== Header & Navigation ========== */
.site-header {
  background: var(--color-bg);
  box-shadow: 0 2px 5px rgba(255, 218, 84, 0.496);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
  
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-header.hidden {
  transform: translateY(-100%);
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}
.main-nav {
  display: flex;
  gap: var(--spacing);
}
.main-nav a {
  padding: 0.5rem 0.75rem;
}
.main-nav a:hover {
  color: var(--color-accent);
}
.btn-cta {
  background-color: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.btn-cta:hover {
  background-color: var(--color-accent);
  color: var(--color-heading);
}

/* ========== Hero Section ========== */
#hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--spacing);
  padding: calc(var(--spacing) * 2) 0;
}
#hero .hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
#hero .hero-content p {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.btn {
  display: inline-block;
  background-color: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.btn:hover {
  background-color: var(--color-accent);
  color: var(--color-heading);
}

/* ========== Page Sections ========== */
section {
  padding: calc(var(--spacing) * 2) 0;
}
#about p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ========== Experience ========== */
#experience .job {
  margin-bottom: var(--spacing);
}
#experience .job h3 {
  font-size: 1.25rem;
}
#experience .job .date {
  color: var(--color-primary);
  font-style: italic;
}

/* ========== Skills Grid ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--spacing);
  list-style: none;
  overflow: visible;
}
.skills-grid li {
  background: #3d3939;
  padding: 0.75rem 1rem;
  text-align: center;
  border-radius: 4px;
  font-weight: 500;
  overflow: visible;
}

/* make each li a relatively-positioned container */
.grid-item {
  position: relative;
  background: #3d3939;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  cursor: default;
  transition: transform 0.2s ease;
  overflow: visible;
}

/* optional “pop” on hover */
.grid-item:hover {
  transform: translateY(-4px);
}

/* the hidden tooltip box */
.grid-item .tooltip {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 70%;
  transform: translateX(-50%);
  background: rgba(164, 147, 60, 0.953);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: normal;      /* allow wrapping */
  width: min(80vw, 400px); /* responsive width */
  max-width: 400px;        /* limit width */
  word-wrap: break-word;    
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

/* arrow below tooltip */
.grid-item .tooltip::after {
  content: "";
  position: absolute;
  top: 100%;  /* at bottom of tooltip */
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(0,0,0,0.85) transparent transparent transparent;
}

.grid-item:hover .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-0.25rem);
}

/* ========== Project Cards ========== */
.project-card {
  background: #414141;
  padding: 1rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: var(--spacing);
}
.project-card h3 {
  margin-bottom: 0.5rem;
}
.project-card a {
  display: inline-block;
  margin-top: 0.5rem;
}

/* ========== Contact Form ========== */
#contact form {
  display: grid;
  gap: var(--spacing);
  max-width: 600px;
  margin: 0 auto;
}
#contact input,
#contact textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
}
#contact button {
  background-color: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
#contact button:hover {
  background-color: var(--color-accent);
  color: var(--color-heading);
}

/* ========== Footer ========== */
.site-footer {
  background: var(--color-bg);
  padding: var(--spacing) 0;
  border-top: 1px solid #eaeaea;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.social-links {
  display: flex;
  gap: var(--spacing);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  #hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .main-nav {
    display: none; /* You can add a mobile menu later */
  }
}

/* ======= Photo Gallery (capped sizes) ======= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: var(--spacing);
  padding-bottom: var(--spacing);
}

/* Constrain the container */
.gallery-item {
  width: 100%;
  max-width: 300px;   /* max width of each thumbnail */
  max-height: 200px;  /* max height of each thumbnail */
  overflow: hidden;
  border-radius: 4px;
}

/* Make the image cover that box */
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ====== Lightbox Styles ====== */
.lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: pointer;
}
.lightbox.hidden {
  display: none;
}
.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}
.lightbox-content img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}
.lightbox-close {
  position: absolute;
  top: -10px; right: -10px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
}
/* ====== Lightbox: fit to viewport ====== */
.lightbox-content {
  /* force the modal to exactly 90% of the viewport */
  width: 90vw;
  height: 90vh;
  position: relative;
}
.lightbox-content img {
  /* make the image fill that box but keep its aspect ratio */
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}
