/* Gruvbox Material Dark palette */
:root {
  --bg:         #282828;
  --bg0:        #1d2021;
  --bg1:        #32302f;
  --bg2:        #3c3836;
  --bg3:        #504945;
  --fg:         #d4be98;
  --fg0:        #e2cca9;
  --fg1:        #c5b18d;
  --red:        #ea6962;
  --orange:     #e78a4e;
  --yellow:     #d8a657;
  --green:      #a9b665;
  --aqua:       #89b482;
  --blue:       #7daea3;
  --purple:     #d3869b;
  --grey:       #928374;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg0);
  color: var(--fg);
  line-height: 1.6;
}

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  background: var(--bg0);
  border-bottom: 1px solid var(--bg2);
  padding: 0.75rem 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

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

.nav-name {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--green);
  font-size: 1.1rem;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--fg1);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* ── Layout ── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Hero ── */
.hero {
  padding: 3rem 0;
  border-bottom: 1px solid var(--bg2);
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.2rem;
  color: var(--fg0);
  margin-bottom: 0.25rem;
}

.hero .tagline {
  font-size: 1.1rem;
  color: var(--yellow);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.hero .clearance {
  display: inline-block;
  background: var(--bg2);
  color: var(--orange);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.hero .contact-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.hero .contact-row a,
.hero .contact-row span {
  color: var(--blue);
  text-decoration: none;
  font-size: 0.9rem;
  font-family: 'JetBrains Mono', monospace;
}

.hero .contact-row a:hover {
  color: var(--aqua);
}

.hero .summary {
  color: var(--fg1);
  max-width: 720px;
  line-height: 1.7;
}

.hero .pdf-link {
  background: var(--bg2);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--green);
  color: var(--green);
  font-weight: 600;
  transition: background 0.2s;
}

.hero .pdf-link:hover {
  background: var(--bg3);
  color: var(--aqua);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  align-items: center;
}

.tech-stack img {
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
}

.tech-stack img:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* ── Currently Working On ── */
.current-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.current-item {
  background: var(--bg1);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--bg2);
  border-left: 3px solid var(--green);
}

.current-name {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fg0);
}

.current-org {
  font-size: 0.85rem;
  color: var(--yellow);
  margin-bottom: 0.5rem;
}

.current-desc {
  font-size: 0.9rem;
  color: var(--fg1);
  line-height: 1.6;
}

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

/* ── Section ── */
.section {
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  color: var(--green);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--bg3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title .prompt {
  color: var(--yellow);
}

/* ── Skills grid ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.skill-item {
  background: var(--bg1);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border-left: 3px solid var(--aqua);
  font-size: 0.9rem;
  color: var(--fg);
}

/* ── Experience ── */
.job {
  background: var(--bg1);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--bg2);
}

.job-header {
  margin-bottom: 1rem;
}

.job-company {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fg0);
}

.job-location {
  color: var(--grey);
  font-size: 0.85rem;
}

.job-title {
  color: var(--yellow);
  font-weight: 600;
  font-size: 1rem;
}

.job-dates {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--blue);
}

.job-category {
  font-weight: 600;
  color: var(--orange);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.job ul {
  list-style: none;
  padding: 0;
}

.job li {
  padding: 0.3rem 0 0.3rem 1.2rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--fg1);
  line-height: 1.6;
}

.job li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--green);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

/* ── Education ── */
.edu-item {
  background: var(--bg1);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--bg2);
}

.edu-degree {
  font-weight: 700;
  color: var(--fg0);
  font-size: 1rem;
}

.edu-school {
  color: var(--aqua);
  font-size: 0.9rem;
}

.edu-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--blue);
}

.honor-badge {
  display: inline-block;
  background: var(--bg3);
  color: var(--yellow);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-style: italic;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--yellow);
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ── Projects / Orgs ── */
.org {
  background: var(--bg1);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--bg2);
}

.org-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.org-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
}

.org-name:hover {
  color: var(--aqua);
}

.org-vis {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.org-vis[class] {
  background: var(--bg2);
  color: var(--grey);
}

.org-desc {
  color: var(--fg1);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.org-repos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.repo-label {
  color: var(--grey);
  font-size: 0.85rem;
  font-style: italic;
}

.repo-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--fg0);
  text-decoration: none;
  background: var(--bg2);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.repo-link:hover {
  background: var(--bg3);
  color: var(--green);
}

.repo-icon {
  width: 14px;
  height: 14px;
  max-width: 14px;
  max-height: 14px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* ── Showcase ── */
.showcase {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bg2);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.showcase-item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--bg3);
  background: var(--bg0);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.showcase-item:hover {
  border-color: var(--green);
  transform: scale(1.02);
}

.showcase-item img {
  width: 100%;
  height: auto;
  display: block;
}

.showcase-caption {
  display: block;
  text-align: center;
  padding: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--fg1);
  background: var(--bg1);
}

/* Lightbox overlay */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  animation: fadeIn 0.2s ease forwards;
}

.lightbox-overlay img {
  width: 95vw;
  height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid var(--bg3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--fg0);
  background: var(--bg1);
  padding: 0.4rem 1rem;
  border-radius: 4px;
  border: 1px solid var(--bg3);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--bg2);
  margin-top: 2rem;
  color: var(--grey);
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.6rem;
  }

  .hero .contact-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Print Styles ── */
@media print {
  body {
    background: white;
    color: #1d2021;
    font-size: 11pt;
  }

  .nav, .footer, .pdf-link, .showcase, .lightbox-overlay, .tech-stack {
    display: none !important;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .hero {
    padding: 1rem 0;
    border-bottom: 2px solid #ccc;
  }

  .hero h1 {
    color: #1d2021;
    font-size: 1.8rem;
  }

  .hero .tagline {
    color: #504945;
  }

  .hero .clearance {
    background: #eee;
    color: #1d2021;
    border: 1px solid #aaa;
  }

  .hero .contact-row a,
  .hero .contact-row span {
    color: #504945;
  }

  .hero .summary {
    color: #3c3836;
  }

  .section-title {
    color: #1d2021;
    border-bottom-color: #ccc;
  }

  .section-title .prompt {
    display: none;
  }

  .skill-item {
    background: #f5f5f5;
    border-left-color: #888;
    color: #1d2021;
  }

  .job, .edu-item, .org, .current-item {
    background: white;
    border-color: #ddd;
    break-inside: avoid;
  }

  .job-company, .edu-degree, .current-name {
    color: #1d2021;
  }

  .job-title, .current-org {
    color: #504945;
  }

  .job-dates, .edu-year {
    color: #666;
  }

  .job-category {
    color: #504945;
  }

  .job li {
    color: #3c3836;
  }

  .job li::before {
    color: #888;
  }

  .honor-badge {
    background: #eee;
    color: #504945;
    border-color: #aaa;
  }

  .org-name {
    color: #1d2021;
  }

  .org-desc, .current-desc {
    color: #3c3836;
  }

  .repo-link {
    background: #f5f5f5;
    color: #1d2021;
    border: 1px solid #ddd;
  }

  a {
    text-decoration: none;
    color: inherit;
  }
}
