/* ===== CSS VARIABLES ===== */
:root {
  --primary: #00ff41;
  --primary-dark: #00cc34;
  --secondary: #39ff14;
  --bg-dark: #0a0e0a;
  --bg-card: #0f130f;
  --bg-lighter: #141a14;
  --text-primary: #ffffff;
  --text-secondary: #b8c5bb;
  --text-dim: #707070;
  --accent-lime: #7fff00;
  --border-color: #1a2a1a;
  --glow-green: rgba(0, 255, 65, 0.4);
}

/* ===== RESET & BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Work Sans', -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(0, 255, 65, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(127, 255, 0, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ===== NAVIGATION ===== */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.8rem;
  color: var(--primary);
  letter-spacing: -1px;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 400;
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
  font-family: 'Work Sans', sans-serif;
}

.nav-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-btn:hover {
  color: var(--text-primary);
}

.nav-btn:hover::after {
  width: 80%;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-top: 80px;
  position: relative;
  min-height: calc(100vh - 80px);
  z-index: 1;
}

.section {
  display: none;
  width: 100%;
  padding: 4rem 2rem;
  min-height: calc(100vh - 80px);
  position: relative;
  z-index: 10;
}

.section.active {
  display: block;
}

/* ===== HOME SECTION ===== */
.home-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  
  grid-template-rows: auto auto;
  grid-template-areas:
    "text photo"
    "text cta";
grid-template-rows: auto auto;
  gap: 3rem;
  align-items: start;
  min-height: auto;
padding: 1rem 0;
}

.home-text {
  grid-area: text;

  animation: slideInLeft 0.8s ease-out;
}

.main-title {
  font-family: 'Archivo Black', sans-serif;
  font-size: 4.5rem;
  line-height: 0.9;
  letter-spacing: 2px;
  margin-bottom: -0.3rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-lime) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px var(--glow-green));
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    filter: drop-shadow(0 0 20px var(--glow-green));
  }
  50% {
    filter: drop-shadow(0 0 30px var(--glow-green)) drop-shadow(0 0 40px var(--glow-green));
  }
}

.title-accent {
  width: 120px;
  height: 6px;
  background: var(--primary);
  margin: 1rem 0 2rem 0;
  box-shadow: 0 0 15px var(--glow-green), 0 0 30px var(--glow-green);
  animation: pulse-bar 2s ease-in-out infinite;
}

@keyframes pulse-bar {
  0%, 100% {
    box-shadow: 0 0 15px var(--glow-green), 0 0 30px var(--glow-green);
  }
  50% {
    box-shadow: 0 0 25px var(--glow-green), 0 0 50px var(--glow-green);
  }
}

.lead-text {
  font-size: 1.2rem;
  font-weight: 200;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.institution {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.skills-caption {
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff ;
  margin-bottom: 1rem;
  font-weight: 600;
}

.skills-caption::after {
  content: "";
  display: block;
  width: 35px;          /* bar length */
  height: 3px;          /* bar thickness */
  margin-top: 0.2rem;

  background: #ffffff;    /* bar color */
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
  border-radius: 2px;
}

.home-specialties {
  display: grid;
  grid-template-columns: repeat(2, max-content); /* 3 columns */
  grid-auto-rows: auto;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: start;
}

.specialty-tag {
  background: transparent;
  border: none;
  box-shadow: none;
  border: none;
  color: var(--primary);
  padding: 0.5rem 1.2rem;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;  
  letter-spacing: 1px;
  position: relative;
}

.specialty-tag::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary), 0 0 12px var(--primary);
  animation: blink-led 2s ease-in-out infinite;
}

@keyframes blink-led {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 8px var(--primary), 0 0 12px var(--primary);
  }
  50% {
    opacity: 0.3;
    box-shadow: 0 0 4px var(--primary);
  }
}

.home-description {
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-top: 0rem;
  margin-bottom: 3rem;
  max-width: 550px;
}

.home-cta {
  display: flex;
  gap: 1rem;
}

.cta-btn {
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Work Sans', sans-serif;
}

.cta-btn.primary {
  background: var(--primary);
  color: #000;
  box-shadow: 0 4px 20px var(--glow-green), 0 0 40px var(--glow-green);
  font-weight: 700;
}

.cta-btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 30px var(--glow-green), 0 0 60px var(--glow-green);
}

.cta-btn.secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--text-primary);
}

.cta-btn.secondary:hover {
  background: var(--text-primary);
  color: var(--bg-dark);
}

/* HOME PHOTO */
.home-photo {
  position: relative;
  animation: slideInRight 0.8s ease-out;
  scale: 0.8;
  left: -150px; /* shifts it slightly left */
  bottom: 40px;
/* shifts it slightly down */
}

.photo-container {
  position: relative;
  z-index: 2;
}

.photo-placeholder {
  width: 100%;
  aspect-ratio: 4/5;

  background: linear-gradient(135deg, var(--bg-lighter) 0%, var(--bg-card) 100%);
  border: 3px solid var(--primary);

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 0 30px var(--glow-green),
              inset 0 0 30px rgba(0, 255, 65, 0.1);

  position: relative;

  overflow: hidden; /* ✅ THIS keeps the photo inside the frame */
}
.profile-photo {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.profile-photo.active {
  opacity: 1;
}

.photo-placeholder::before,
.photo-placeholder::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.photo-placeholder::before {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
}

.photo-placeholder::after {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
}

.photo-placeholder p {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.photo-placeholder small {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.photo-accent {
  position: absolute;
  top: 30px;
  right: -30px;
  width: 100%;
  height: 100%;
  border: 3px solid var(--accent-lime);
  z-index: 1;
  box-shadow: 0 0 20px rgba(127, 255, 0, 0.4);
}

/* ===== SECTION HEADERS ===== */
.section-header {
  max-width: 1400px;
  margin: 0 auto 4rem auto;
}

.section-title {
  font-family: 'Archivo Black', sans-serif;
  font-size: 3.5rem;
  letter-spacing: -2px;
  margin-bottom: 1rem;
}

.section-accent {
  width: 100px;
  height: 5px;
  background: var(--primary);
}

/* ===== ABOUT SECTION ===== */
.about-content {
  max-width: 1400px;
  margin: 0 auto;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-photo {
  position: sticky;   /* or relative if you don’t want sticky */
  top: 0px;
  align-self: start;
  margin-top: -150px; /* pulls photo up beside the title */
}

.about-photo .photo-container {
  position: relative; /* IMPORTANT: anchor for the accent */
}

.photo-accent {
  position: absolute;
  top: -18px;
  left: 18px;
  width: 100%;
  height: 100%;
}


/* Make About photos fade like Home */
.about-profile-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.about-profile-photo.active {
  opacity: 1;
}
/* Make About text use full column width */
.about-grid .about-intro {
  max-width: none;
}

/* On smaller screens, stack */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

.about-photo {
  align-self: start;
  justify-self: end;
  max-width: 520px;
}

  .about-photo .photo-accent {
    display: none;
  }
}

.about-main {
  animation: fadeInUp 0.8s ease-out;
}

.about-intro {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 4rem;
  max-width: 900px;
}

/* ===== SUBSECTION CARDS ===== */
.subsection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.subsection-card {
  background: var(--bg-card);
  border-left: 4px solid var(--primary);
  padding: 2rem;
  transition: all 0.3s ease;
  box-shadow: -4px 0 15px rgba(0, 255, 65, 0.1);
  position: relative;
}

.subsection-card::before {
  content: '';
  position: absolute;
  top: 20px;
  left: -8px;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
  animation: blink-led 3s ease-in-out infinite;
}

.subsection-card:hover {
  transform: translateX(10px);
  border-left-color: var(--accent-lime);
  background: var(--bg-lighter);
  box-shadow: -4px 0 25px var(--glow-green);
}

.subsection-card h3,
.subsection-card h4 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.subsection-card h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.card-description {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.subsection-link {
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-block;
  position: relative;
  padding-left: 1.5rem;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.subsection-link::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.subsection-link:hover {
  color: var(--text-primary);
  padding-left: 2rem;
}

.subsection-link:hover::before {
  transform: translateX(5px);
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-content {
  max-width: 1400px;
  margin: 0 auto;
}

.portfolio-intro {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-card::after {
  content: '';
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--primary), 0 0 25px var(--primary);
  animation: blink-led 2s ease-in-out infinite;
}

.project-number {
  position: absolute;
  top: -10px;
  right: 20px;
  font-family: 'Archivo Black', sans-serif;
  font-size: 5rem;
  color: var(--bg-dark);
  -webkit-text-stroke: 2px var(--primary);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.project-card:hover .project-number {
  opacity: 1;
  transform: translateY(-10px);
}

/* ===== PORTFOLIO: PROJECT TILES + DETAIL SECTIONS ===== */
.project-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.project-tile {
  pointer-events: auto;
  width: 100%;
  text-align: left;
  background: linear-gradient(135deg, rgba(15, 19, 15, 0.95) 0%, rgba(20, 26, 20, 0.9) 100%);
  border: 2px solid rgba(0, 255, 65, 0.55);
  border-radius: 18px;
  padding: 1.1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}

.project-tile::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: radial-gradient(circle at 20% 20%, rgba(0, 255, 65, 0.18) 0%, transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}

.project-tile:hover {
  transform: translateY(-10px);
  border-color: var(--accent-lime);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45), 0 0 55px rgba(0, 255, 65, 0.22);
}

.project-tile-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 65, 0.35);
  box-shadow: inset 0 0 20px rgba(0, 255, 65, 0.08);
  background: var(--bg-card);
}

.project-tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: scale(1.02);
}

.project-tile-meta {
  padding-top: 0.9rem;
}

.project-tile-kicker {
  font-size: 0.75rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(184, 197, 187, 0.85);
  margin-bottom: 0.35rem;
}

.project-tile-title {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.project-tile-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.project-tile-chip {
  display: inline-flex;
  margin-top: 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 1px;
  text-transform: uppercase;

  background: var(--primary);
  color: #000;

  padding: 0.35rem 0.65rem;
  border-radius: 999px;

  box-shadow: none;                /* remove glow */
  transition: background 0.25s ease, color 0.25s ease;
}


.project-tile:hover .project-tile-chip {
  color: #ffffff;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.9),
    0 0 16px rgba(255, 255, 255, 0.6),
    0 0 24px rgba(255, 255, 255, 0.4);
}

.project-tile:hover .project-tile-chip {
  background: var(--primary-dark); /* darker green */
  color: #ffffff;                  /* bright white text */
}

.project-details {
  margin-top: 3.2rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.project-detail {
  background: rgba(15, 19, 15, 0.85);
  border: 1px solid rgba(0, 255, 65, 0.25);
  border-radius: 22px;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

.project-detail::after {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(0, 255, 65, 0.16) 0%, transparent 65%);
  filter: blur(2px);
  pointer-events: none;
}

/* ================================
   PROJECT TEXT HIERARCHY POLISH
================================ */

.project-detail-left h3 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.9rem;
  margin-bottom: 0.4rem;
}

.project-detail-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.2rem;
  margin-bottom: 1.6rem;
  max-width: 650px;
}

.project-detail-text p {
  color: var(--text-secondary);
  line-height: 1.75;
}

.project-subtitle {
  font-family: 'Archivo Black', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-top: 1.5rem;
  margin-bottom: 0.7rem;
}

.project-detail-bullets {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.2rem;
  max-width: 650px;
}

.project-detail-bullets li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.6rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.project-detail-bullets li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary);
}
.project-detail.is-highlight {
  border-color: rgba(127, 255, 0, 0.7);
  box-shadow: 0 0 55px rgba(0, 255, 65, 0.12);
}

/* ===== CONTACT SECTION ===== */
.contact-content {
  max-width: 1400px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-main h3,
.resume-section h3 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 2rem;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.contact-intro {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.contact-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.download-link::before {
  content: '↓';
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-card);
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
}

/* ===== ANIMATIONS ===== */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */

/* ===== MECHANICAL DECORATIONS ===== */
.mechanical-decor {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.hex-nut {
  position: absolute;
  color: var(--primary);
  opacity: 0.15;
  filter: drop-shadow(0 0 10px var(--glow-green));
}

.hex-1 {
  width: 180px;
  height: 180px;
  top: 12%;
  right: 8%;
  animation: rotate-clockwise 25s linear infinite;
}

.hex-2 {
  width: 120px;
  height: 120px;
  bottom: 18%;
  left: 6%;
  animation: rotate-counter 18s linear infinite;
}

@keyframes rotate-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotate-counter {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.caliper {
  position: absolute;
  width: 630px;
  top: 45%;
  left: 72%;
  opacity: 0.3;
  filter: drop-shadow(0 0 20px var(--glow-green));
  animation: float-caliper 12s ease-in-out infinite;
}

.caliper-svg,
.caliper object {
  width: 100%;
  height: auto;
  pointer-events: none;
  filter: brightness(1.3) hue-rotate(90deg) saturate(2) drop-shadow(0 0 15px var(--glow-green));
}

.caliper svg {
  width: 100%;
  height: auto;
  filter: brightness(1.3) hue-rotate(90deg) saturate(2);
}

@keyframes float-caliper {
  0%, 100% {
    transform: translateX(0px) scale(1) rotate(62deg);
  }

  25% {
    transform: translateX(-6px) scale(1.05) rotate(61deg);
  }

  50% {
    transform: translateX(6px) scale(1.06) rotate(62deg);
  }

  75% {
    transform: translateX(-4px) scale(1.03) rotate(63deg);
  }
}

/* Digital display overlay on caliper */
/* Digital display overlay on caliper */
.caliper-digital-display {
  position: absolute;

  /* Move the text around */
  top: 65%;
  left: 25%;

  /* No weird box */
  background: none;
  border: none;
  padding: 0;
}

.display-value {
  font-size: 20px;
  font-family: monospace;
  font-weight: bold;
  letter-spacing: 2px;

  /* Green neon */
  color: var(--primary);

  /* Glow only */
  text-shadow:
    0 0 6px rgba(0, 255, 65, 0.9),
    0 0 14px rgba(0, 255, 65, 0.6),
    0 0 22px rgba(0, 255, 65, 0.4);
}

.display-unit {
  font-size: 12px;
  font-family: monospace;
  font-weight: bold;
  margin-left: 4px;
  opacity: 0.85;

  color: var(--primary);

  text-shadow: 0 0 6px rgba(0, 255, 65, 0.6);
}

.display-value {
  font-size: 20px;
  /* CUSTOMIZE COLOR HERE - change the color value */
  color: var(--primary);  /* Use var(--primary) for green, or use hex like #ff0000 for red */
  text-shadow: 
    0 0 10px var(--primary),   /* Inner glow */
    0 0 20px var(--primary),   /* Middle glow */
    0 0 30px var(--primary),   /* Outer glow */
    0 0 40px var(--primary);   /* Far glow - makes it really bright! */
  letter-spacing: 2px;
}

.display-unit {
  font-size: 12px;
  color: var(--primary);  /* CUSTOMIZE: Change this to match display-value color */
  opacity: 0.8;
  margin-left: 4px;
  text-shadow: 0 0 10px var(--primary);
}

.caliper-display {
  animation: flicker-display 4s ease-in-out infinite;
}

@keyframes flicker-display {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}

@keyframes display-flicker {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}

.caliper-led {
  position: absolute;
  top: 43.25%;
  left: 87.55%;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 100%;
  box-shadow: 0 0 12px var(--primary), 0 0 40px var(--primary);
  animation: blink-led 3s ease-in-out infinite;
}

.caliper-reading {
  animation: caliper-reading-change 6s ease-in-out infinite;
}

@keyframes caliper-reading-change {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.led-indicator {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--primary), 0 0 30px var(--primary), 0 0 45px var(--primary);
}

.led-1 {
  top: 25%;
  left: 5%;
  animation: blink-led 2s ease-in-out infinite;
}

.led-2 {
  top: 80%;
  right: 15%;
  animation: blink-led 3s ease-in-out infinite 0.5s;
}

.led-3 {
  bottom: 10%;
  right: 55%;
  animation: blink-led 2.5s ease-in-out infinite 1s;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .home-grid {
    grid-template-columns: 1fr;
  grid-template-rows: auto auto;
    gap: 3rem;
  }

  .photo-accent {
    display: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .main-title {
    font-size: 3.5rem;
  }

  .section-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 1rem;
  }

  .nav-links {
    gap: 0;
  }

  .nav-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }

  .section {
    padding: 2rem 1rem;
  }

  .main-title {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

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

  .project-detail {
    grid-template-columns: 1fr;
  }

  .home-cta {
    flex-direction: column;
  }

  .cta-btn {
    width: 100%;
  }
}

/* ===== FLOATING MECHANICAL SYMBOLS ===== */
.floating-symbols {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.float-symbol {
  position: absolute;
  font-family: 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--primary);
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 0 8px var(--glow-green);
}

.float-symbol sub {
  font-size: 0.6em;
}

/* Individual symbol styling and animations */
.symbol-1 {
  font-size: 2rem;
  top: 15%;
  left: -5%;
  animation: float-in-1 60s ease-in-out infinite;
}

.symbol-2 {
  font-size: 1.8rem;
  top: 45%;
  left: -5%;
  animation: float-in-2 60s ease-in-out infinite 3s;
}

.symbol-3 {
  font-size: 2.2rem;
  top: 75%;
  left: -5%;
  animation: float-in-3 60s ease-in-out infinite 7s;
}

.symbol-4 {
  font-size: 1.7rem;
  top: 30%;
  right: -5%;
  animation: float-in-4 60s ease-in-out infinite 5s;
}

.symbol-5 {
  font-size: 2rem;
  top: 60%;
  right: -5%;
  animation: float-in-5 60s ease-in-out infinite 10s;
}

.symbol-6 {
  font-size: 1.9rem;
  top: 85%;
  right: -5%;
  animation: float-in-6 60s ease-in-out infinite 2s;
}

.symbol-7 {
  font-size: 2.1rem;
  top: 20%;
  left: -5%;
  animation: float-in-7 60s ease-in-out infinite 8s;
}

.symbol-8 {
  font-size: 1.8rem;
  top: 55%;
  left: -5%;
  animation: float-in-8 60s ease-in-out infinite 12s;
}

.symbol-9 {
  font-size: 1.9rem;
  top: 40%;
  right: -5%;
  animation: float-in-9 60s ease-in-out infinite 6s;
}

.symbol-10 {
  font-size: 2rem;
  top: 70%;
  right: -5%;
  animation: float-in-10 60s ease-in-out infinite 14s;
}

.symbol-11 {
  font-size: 1.7rem;
  top: 10%;
  right: -5%;
  animation: float-in-11 60s ease-in-out infinite 4s;
}

.symbol-12 {
  font-size: 2.1rem;
  top: 90%;
  left: -5%;
  animation: float-in-12 60s ease-in-out infinite 9s;
}

/* Float-in animations from left */
@keyframes float-in-1 {
  0%, 100% {
    left: -10%;
    opacity: 0;
    transform: scale(0.8);
  }
  10% {
    opacity: 0.15;
  }
  50% {
    left: 110%;
    opacity: 0.2;
    transform: scale(1.1);
  }
  90% {
    opacity: 0.15;
  }
}

@keyframes float-in-2 {
  0%, 100% {
    left: -10%;
    opacity: 0;
    transform: scale(0.9) rotate(0deg);
  }
  15% {
    opacity: 0.18;
  }
  50% {
    left: 110%;
    opacity: 0.25;
    transform: scale(1) rotate(15deg);
  }
  85% {
    opacity: 0.18;
  }
}

@keyframes float-in-3 {
  0%, 100% {
    left: -10%;
    opacity: 0;
    transform: scale(0.7);
  }
  12% {
    opacity: 0.2;
  }
  50% {
    left: 110%;
    opacity: 0.22;
    transform: scale(1.2);
  }
  88% {
    opacity: 0.2;
  }
}

/* Float-in animations from right */
@keyframes float-in-4 {
  0%, 100% {
    right: -10%;
    opacity: 0;
    transform: scale(0.85);
  }
  10% {
    opacity: 0.17;
  }
  50% {
    right: 110%;
    opacity: 0.23;
    transform: scale(1.15);
  }
  90% {
    opacity: 0.17;
  }
}

@keyframes float-in-5 {
  0%, 100% {
    right: -10%;
    opacity: 0;
    transform: scale(0.9) rotate(0deg);
  }
  15% {
    opacity: 0.19;
  }
  50% {
    right: 110%;
    opacity: 0.24;
    transform: scale(1.05) rotate(-12deg);
  }
  85% {
    opacity: 0.19;
  }
}

@keyframes float-in-6 {
  0%, 100% {
    right: -10%;
    opacity: 0;
    transform: scale(0.75);
  }
  12% {
    opacity: 0.16;
  }
  50% {
    right: 110%;
    opacity: 0.21;
    transform: scale(1.1);
  }
  88% {
    opacity: 0.16;
  }
}

@keyframes float-in-7 {
  0%, 100% {
    left: -10%;
    opacity: 0;
    transform: scale(0.8) rotate(0deg);
  }
  10% {
    opacity: 0.2;
  }
  50% {
    left: 110%;
    opacity: 0.25;
    transform: scale(1.2) rotate(10deg);
  }
  90% {
    opacity: 0.2;
  }
}

@keyframes float-in-8 {
  0%, 100% {
    left: -10%;
    opacity: 0;
    transform: scale(0.9);
  }
  15% {
    opacity: 0.18;
  }
  50% {
    left: 110%;
    opacity: 0.22;
    transform: scale(1);
  }
  85% {
    opacity: 0.18;
  }
}

@keyframes float-in-9 {
  0%, 100% {
    right: -10%;
    opacity: 0;
    transform: scale(0.85) rotate(0deg);
  }
  10% {
    opacity: 0.19;
  }
  50% {
    right: 110%;
    opacity: 0.24;
    transform: scale(1.1) rotate(-8deg);
  }
  90% {
    opacity: 0.19;
  }
}

@keyframes float-in-10 {
  0%, 100% {
    right: -10%;
    opacity: 0;
    transform: scale(0.8);
  }
  12% {
    opacity: 0.17;
  }
  50% {
    right: 110%;
    opacity: 0.23;
    transform: scale(1.15);
  }
  88% {
    opacity: 0.17;
  }
}

@keyframes float-in-11 {
  0%, 100% {
    right: -10%;
    opacity: 0;
    transform: scale(0.9) rotate(0deg);
  }
  10% {
    opacity: 0.2;
  }
  50% {
    right: 110%;
    opacity: 0.25;
    transform: scale(1.05) rotate(15deg);
  }
  90% {
    opacity: 0.2;
  }
}

@keyframes float-in-12 {
  0%, 100% {
    left: -10%;
    opacity: 0;
    transform: scale(0.75);
  }
  15% {
    opacity: 0.16;
  }
  50% {
    left: 110%;
    opacity: 0.21;
    transform: scale(1.2);
  }
  85% {
    opacity: 0.16;
  }
}

/* Hide symbols on mobile to reduce visual clutter */
@media (max-width: 768px) {
  .floating-symbols {
    display: none;
  }
}


/* ===== CTA BUTTONS UNDER PHOTO ===== */
.home-cta.under-photo {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
justify-content: center;
}


/* ===== HOME GRID PLACEMENT: CTA UNDER PHOTO ===== */
.home-photo {
  grid-column: 2;
  grid-row: 1;
}

.home-cta.under-photo {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
justify-content: center;
  align-items: center;
  position: relative;
  z-index: 20; /* ensure above decorative accents */
  transform: translate(-195px, -130px);
}


@media (max-width: 1024px) {
  .home-photo { grid-column: 1; grid-row: 2; }
  .home-cta.under-photo { grid-column: 1; grid-row: 3; }
}

/* ===== HOME GRID AREAS (robust placement) ===== */
.home-photo { grid-area: photo; }
.home-cta.under-photo { grid-area: cta; }

@media (max-width: 1024px) {
  .home-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "text"
      "photo"
      "cta";
  }
}

/* ===== HOME SECTION SPACING (NO INITIAL SCROLL) ===== */
#home.section.active {
  padding-top: 2rem;
  padding-bottom: 2rem;
}


/* ===== RESUME HERO POSTER (IMAGE PREVIEW) ===== */
.resume-viewer.poster {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.resume-poster-link {
  display: block;
  text-decoration: none;
  transform: translateY(-150px);
}

/* Caption text */
.resume-poster-link::before {
  content: "Resume · Click to download, I know you want to :)";
  position: absolute;
  top: -42px;          /* distance ABOVE the poster */
  left: 0;

  font-family: 'Archivo Black', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;

  color: var(--primary);
  opacity: 0.85;

  text-shadow:
    0 0 12px rgba(0, 255, 65, 0.4);

  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Caption reacts together with hover */
.resume-poster-link:hover::before {
  transform: translateY(-6px);
  opacity: 1;
}

.resume-poster {
  width: 100%;
  height: auto;
  max-height: min(78vh, 880px);
  object-fit: contain;
  display: block;

  border-radius: 10px;
  box-shadow:
    0 0 0 rgba(0, 0, 0, 0.65),
    0 0 55px rgba(0, 255, 65, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.resume-poster-link:hover .resume-poster {
  transform: translateY(-20px);
  box-shadow:
    0 30px 5px rgba(0, 0, 0, 0.7),
    0 0 75px rgba(0, 255, 65, 0.22);
}
.photo-fallback{position:absolute;bottom:12px;left:12px;right:12px;font-size:0.9rem;opacity:0.75;z-index:3;}
.photo-fallback code{font-family:monospace;}



/* =========================================================
   PORTFOLIO GALLERY — BIG, NO CROP, AUTO-ORGANIZED (MASONRY)
   ========================================================= */

/* Give the gallery (right side) more room */
.project-detail{
  grid-template-columns: 1fr 1.35fr;
  gap: 2rem;
}

/* Responsive masonry that maximizes image size */
.project-gallery{
  column-count: 1;          /* BIG by default */
  column-gap: 18px;
  column-fill: balance;
}

@media (min-width: 1100px){
  .project-gallery{ column-count: 2; } /* still big, but denser */
}

@media (max-width: 1000px){
  .project-detail{ grid-template-columns: 1fr; }
  .project-gallery{ column-count: 1; column-gap: 14px; }
}

/* Full image visible (no cropping) */
.project-gallery img{
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 18px 0;

  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;

  border-radius: 14px;
  border: 1px solid rgba(0, 255, 65, 0.22);
  box-shadow: 0 0 22px rgba(0, 255, 65, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: zoom-in;
}

.project-gallery img:hover{
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 0 55px rgba(0, 255, 65, 0.22);
}

/* Neutralize old JS auto-pack classes (if present) */
.project-gallery img.is-wide,
.project-gallery img.is-tall,
.project-gallery img.is-big{
  grid-column: auto !important;
  grid-row: auto !important;
}

.project-gallery video {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 18px;
  border-radius: 14px;
  border: 1px solid rgba(0, 255, 65, 0.22);
  box-shadow: 0 0 22px rgba(0, 255, 65, 0.08);
}

/* Per-project gallery column control */
.project-gallery[data-columns="1"]{
  column-count: 1 !important;
}

.project-gallery[data-columns="2"]{
  column-count: 2;
}

/* On smaller screens everything becomes 1 column anyway */
@media (max-width: 1000px){
  .project-gallery[data-columns="2"]{
    column-count: 1;
  }
}


/* =========================================================
   LIGHTBOX + CLICKABLE GALLERY IMAGES
   ========================================================= */

.site-hint{
  margin-top: 1.2rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 900px;
  opacity: 0.95;
}
.site-hint strong{ color: var(--primary); }

/* Lightbox overlay */
.lightbox{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  z-index: 3000;
}

.lightbox.is-open{ display: flex; }

.lightbox-figure{
  margin: 0;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  width: 100%;
  background: rgba(15, 19, 15, 0.92);
  border: 1px solid rgba(0, 255, 65, 0.35);
  border-radius: 18px;
  box-shadow: 0 0 70px rgba(0, 255, 65, 0.16);
  overflow: hidden;
}

.lightbox-img{
  display: block;
  width: 100%;
  height: auto;
  max-height: 76vh;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.25);
}

.lightbox-caption{
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-top: 1px solid rgba(0, 255, 65, 0.18);
}

.lightbox-close{
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 65, 0.35);
  background: rgba(15, 19, 15, 0.92);
  color: var(--text-primary);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lightbox-close:hover{
  transform: translateY(-2px);
  border-color: rgba(127, 255, 0, 0.8);
  box-shadow: 0 0 50px rgba(0, 255, 65, 0.18);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  .project-gallery img,
  .lightbox-close{ transition: none; }
}

.last-edited{
  margin-top: -0.6rem;   /* pull it upward */
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.2px;
}

.last-edited-label{
  color: var(--text-secondary);
}

.last-edited-sep{
  margin: 0 0.5rem;
  opacity: 0.55;
}
