@import url('https://fonts.googleapis.com/css?family=Lexend');

/* Global Styling */
* {
  font-family: 'Lexend', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  transition: background-color 0.5s ease, color 0.5s ease, text-shadow 0.5s ease;
}

/* Body and Section Styling */
html, body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  transition: background 0.8s ease-in-out;
  background-color: #f7f9fc;
  color: var(--text);
}

/* Smooth Theme Switch Effect */
body.theme-transition {
  transition: background 0.8s ease-in-out, filter 0.8s ease-in-out;
  filter: brightness(0.9) contrast(1.1);
}

/* Separator Image Transition */
.separator {
  width: 100vw;
  height: 100px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  background-attachment: fixed;
  transition: background-image 1s ease-in-out, opacity 0.6s ease-in-out;
}

/* Sections */
section {
  padding: 5rem 1.5rem;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  position: relative;
  scroll-margin-top: 80px;
  transition: background 0.8s ease-in-out;
}

section.first {
  min-height: 100vh;
  padding-top: 6rem;
}

/* Theme Variables */
:root {
  --maize: #ffcb05;
  --navy: #00274c;

  --bg-gradient-first: linear-gradient(180deg, #f7f9fc, #eef3f9);
  --bg-gradient-about: linear-gradient(180deg, #eef3f9, #e9f0f7);
  --bg-gradient-technologies: linear-gradient(180deg, #e9f0f7, #eff4f9);
  --bg-gradient-experience: linear-gradient(180deg, #eff4f9, #f3f6fa);
  --bg-gradient-projects: linear-gradient(180deg, #f3f6fa, #f7f9fc);
  --bg-gradient-progress: linear-gradient(90deg, #00274c, #2e5e9e, #ffcb05);
  --bg-gradient-navbar: linear-gradient(180deg, #00274c, #2e5e9e);

  --bg-image-progress: url('../photos/vaporeon.gif');

  --text: #1e2a3a;
  --text-muted: #4a5a6e;
  --heading: #00274c;
  --card-bg: #ffffff;
  --card-border: rgba(0, 39, 76, 0.1);
  --nav-bg: rgba(255, 255, 255, 0.85);
  --nav-link: #00274c;
  --chip-bg: #ffffff;

  --text-glow: #1e2a3a;
  --text-shadow: none;

  --separator-1: url('../menu/bursley.jpg');
  --separator-2: url('../menu/eastquad.jpg');
  --separator-3: url('../menu/northquad.jpg');
  --separator-4: url('../menu/mosherjordan.jpg');
}

/* Dark Mode */
.dark-mode {
  --bg-gradient-first: linear-gradient(180deg, #0b1220, #0e1729);
  --bg-gradient-about: linear-gradient(180deg, #0e1729, #101b30);
  --bg-gradient-technologies: linear-gradient(180deg, #101b30, #122038);
  --bg-gradient-experience: linear-gradient(180deg, #122038, #101b30);
  --bg-gradient-projects: linear-gradient(180deg, #101b30, #0b1220);
  --bg-gradient-progress: linear-gradient(90deg, #ffcb05, #ffe38a);
  --bg-gradient-navbar: linear-gradient(180deg, #ffcb05, #ffe38a);

  --text: #e6ecf4;
  --text-muted: #9fb0c4;
  --heading: #ffcb05;
  --card-bg: #131f33;
  --card-border: rgba(255, 203, 5, 0.18);
  --nav-bg: rgba(11, 18, 32, 0.85);
  --nav-link: #ffcb05;
  --chip-bg: #131f33;

  --text-glow: #e6ecf4;
  --text-shadow: 0px 0px 15px rgba(255, 217, 0, 0.25);

  --separator-1: url('../photos/neoncity.gif');
  --separator-2: url('../photos/bmw.gif');
  --separator-3: url('../photos/lovers.gif');
  --separator-4: url('../photos/nighttime.gif');
}

body.dark-mode {
  background-color: #0b1220;
}

/* Apply Dynamic Theme Variables */
.first { background: var(--bg-gradient-first);}
.about { background: var(--bg-gradient-about); }
.technologies { background: var(--bg-gradient-technologies); }
.projects { background: var(--bg-gradient-projects); }
.experience { background: var(--bg-gradient-experience); }

.separator-1 { background-image: var(--separator-1); }
.separator-2 { background-image: var(--separator-2); }
.separator-3 { background-image: var(--separator-3); }
.separator-4 { background-image: var(--separator-4); }

.text-content {
  color: var(--text-glow);
  text-shadow: var(--text-shadow);
  transition: color 0.5s ease, text-shadow 0.8s ease-in-out;
}

/* Flashlight = theme toggle. Pinned bottom-right so it is reachable from
   every section, and labelled so people know what it does. */
#flashlight-container {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1000;
  animation: bobbing 1.4s infinite alternate ease-in-out;
}

/* Flashlight Image */
#pixel-flashlight {
  width: 64px;
  height: auto;
  image-rendering: pixelated;
  pointer-events: none;
  filter: drop-shadow(0 0 22px rgba(244, 255, 164, 0.9));
  transition: filter 0.3s ease;
}

#flashlight-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: var(--text-muted);
  text-shadow: none;
  pointer-events: none;
  user-select: none;
}

#flashlight-container:hover #pixel-flashlight,
#flashlight-container:focus-visible #pixel-flashlight {
  filter: drop-shadow(0 0 34px rgba(255, 240, 140, 1));
}

#flashlight-container:hover #flashlight-label,
#flashlight-container:focus-visible #flashlight-label {
  color: var(--heading);
}

body.dark-mode #pixel-flashlight {
  filter: drop-shadow(0 0 26px rgba(255, 203, 5, 0.75));
}

/* Bobbing Animation */
@keyframes bobbing {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.ripple {
  position: fixed;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1100;
  animation: rippleEffect 0.6s ease-out;
}

@keyframes rippleEffect {
  from {
      transform: translate(-50%, -50%) scale(1);
      opacity: 0.8;
  }
  to {
      transform: translate(-50%, -50%) scale(10);
      opacity: 0;
  }
}

/* Animated Gradient Effect */
@keyframes gradientAnimationVertical {
  0% { background-position: 0% 0%; }
  50% { background-position: 50% 100%; }
  100% { background-position: 0% 0%; }
}

/* Containers & Content */
.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 1200px;
}

.content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  width: 100%;
  flex-wrap: wrap;
}

.text-content {
  flex: 1;
  min-width: 280px;
  text-align: left;
  font-size: 1.8rem;
  line-height: 1.5;
}

h1 {
  font-size: clamp(2rem, 5vw, 6rem);
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--heading);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  color: var(--heading);
}

/* Section headings with a maize underline bar */
.section-heading {
  width: 100%;
  max-width: 900px;
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  display: inline-block;
  padding-bottom: 0.4rem;
  border-bottom: 4px solid var(--maize);
  margin-bottom: 1.2rem;
}

.section-lede {
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.6;
  max-width: 42rem;
  margin: 0 auto;
}

.typing-effect {
  font-size: clamp(1.5rem, 2.5vw, 1.8rem);
  margin-bottom: 30px;
  white-space: nowrap;
  line-height: 1.2;
  overflow: hidden;
  border-right: 2px solid var(--maize);
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  0%, 100% { border-color: transparent; }
  50% { border-color: var(--maize); }
}

h1.typing-effect {
  text-align: left;
  font-size: clamp(2rem, 6vw, 6rem);
  width: 100%;
  margin-bottom: 12px;
}

h2.typing-effect {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 1.2rem;
}

/* Hero */
.hero-subtitle {
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.hero-tagline {
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.8rem;
  max-width: 32rem;
}

.accent {
  color: var(--maize);
  font-weight: 700;
}

.accent-underline {
  border-bottom: 3px solid var(--maize);
  font-weight: 600;
}

/* Hero call-to-actions — the two things a visitor actually came for */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: 12px;
  border: 2px solid transparent;
  font-size: clamp(0.95rem, 1.7vw, 1.1rem);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
              background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
  background: var(--maize);
  color: #00274c;
  box-shadow: 0 6px 18px rgba(255, 203, 5, 0.35);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(255, 203, 5, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--heading);
  border-color: var(--heading);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--heading);
  color: var(--card-bg);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 39, 76, 0.22);
}

.social-icons {
  display: flex;
  gap: 20px;
  justify-content: start;
}

.social-icon {
  font-size: clamp(2rem, 3vw, 2.5rem);
  color: var(--heading);
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-icon:hover {
  color: var(--maize);
  transform: scale(1.15) translateY(-3px);
}

.dark-mode .social-icon:hover {
  color: #ffffff;
}

#headshot {
  width: min(25rem, 80vw);
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 6px var(--maize), 0px 10px 30px rgba(0, 39, 76, 0.3);
}

.image-content {
  flex: 1;
  min-width: 260px;
  text-align: center;
}

.section-hidden {
  opacity: 0;
  transform: scale(0.8);
}

.section-visible {
  opacity: 1;
  transform: scale(1);
}

.first.section-visible {
  opacity: 1;
  transform: scale(1);
}

.fade-in {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 1.2s ease-in-out, transform 1.2s ease-in-out;
}

/* State when the element is visible */
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* About */
.about-fact {
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  margin-bottom: 0.6rem;
}

.about-fact i {
  color: var(--maize);
  width: 2rem;
}

.about-blurb {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 1.5rem;
}

#blockm {
  max-width: 70%;
  height: auto;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 24px rgba(0, 39, 76, 0.12);
  border-radius: 16px;
}

#discord, #minecraft {
  width: 100%;
  height: auto;
  object-fit: cover;
  opacity: 0.9;
}

#projectText {
  font-size: clamp(2.2rem, 3.5vw, 2.8rem);
}

/* Align Images in a Group */
.image-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

/* Skills grouped into labeled rows of chips */
.skills-groups {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  width: 100%;
  max-width: 850px;
  align-items: center;
}

.skill-group {
  width: 100%;
}

.skill-group-title {
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.skill-group-title::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--maize);
  border-radius: 2px;
  margin: 0.4rem auto 0;
}

/* Skills grid of chips */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 850px;
  width: 100%;
}

.skill-box {
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  background-color: var(--chip-bg);
  border: 1px solid var(--card-border);
  border-bottom: 3px solid var(--maize);
  box-shadow: 0 4px 12px rgba(0, 39, 76, 0.08);
  text-align: center;
  color: var(--text);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 500;
  white-space: nowrap;
}

.skill-box i {
  color: var(--heading);
  margin-left: 0.4rem;
}

.skill-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 39, 76, 0.18);
  cursor: default;
}

.underline{
  text-decoration: underline;
}

/* Experience cards */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
  align-items: start;
}

.exp-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-top: 4px solid var(--maize);
  border-radius: 14px;
  padding: 1.75rem;
  text-align: left;
  box-shadow: 0 6px 18px rgba(0, 39, 76, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 1.2s ease-in-out;
}

.exp-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0, 39, 76, 0.18);
}

.exp-role {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--heading);
  margin-bottom: 0.3rem;
}

.exp-org {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  font-weight: 600;
  color: var(--text);
}

.exp-dates {
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.exp-desc {
  font-size: clamp(0.85rem, 1.6vw, 0.95rem);
  line-height: 1.65;
  color: var(--text-muted);
}

@media screen and (max-width: 768px) {
  /* On smaller screens, stack the text and image vertically */
  .first {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .container {
    flex-direction: column;
    align-items: center;
  }

  .content {
    flex-direction: column;
    gap: 20px;
  }

  .text-content {
    text-align: center;
    font-size: 1.6rem;
  }

  .social-icons {
    justify-content: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  #flashlight-container {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  #pixel-flashlight {
    width: 48px;
  }

  #headshot {
    width: 80%;
    min-width: 250px;
    max-width: 500px;
    height: auto;
  }
}

/* Project carousel cards */
.owl-carousel .owl-stage {
  display: flex;
}

.owl-carousel .owl-item {
  display: flex;
}

.owl-carousel .item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  width: 100%;
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-sizing: border-box;
  box-shadow: 0 8px 24px rgba(0, 39, 76, 0.12);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.owl-carousel .item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 39, 76, 0.2);
  border-color: var(--maize);
}

.owl-carousel .item img.project-logo {
  width: clamp(70px, 10vw, 110px);
  height: clamp(70px, 10vw, 110px);
  object-fit: contain;
  border-radius: 14px;
  margin-bottom: 1.2rem;
}

.project-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--heading);
  margin-bottom: 0.8rem;
}

.project-desc {
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 34rem;
  margin-bottom: 1.2rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.project-tags span {
  font-size: clamp(0.7rem, 1.3vw, 0.85rem);
  font-weight: 600;
  color: var(--heading);
  background: rgba(255, 203, 5, 0.15);
  border: 1px solid rgba(255, 203, 5, 0.45);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  white-space: nowrap;
}

.project-link {
  margin-top: auto;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  font-weight: 600;
  color: var(--heading);
  border-bottom: 2px solid var(--maize);
  padding-bottom: 2px;
  transition: color 0.25s ease;
}

.owl-carousel .item:hover .project-link {
  color: var(--maize);
}

/* Owl carousel nav dots follow the theme */
.owl-theme .owl-dots .owl-dot span {
  background: var(--card-border);
}

.owl-theme .owl-dots .owl-dot.active span,
.owl-theme .owl-dots .owl-dot:hover span {
  background: var(--maize);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
  padding: 0.5rem 1rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 39, 76, 0.15);
}

.navbar a {
  text-decoration: none;
  color: var(--nav-link);
  font-weight: 500;
  padding: 0.5rem 1rem;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  border-bottom: 3px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.navbar a:hover {
  border-bottom-color: var(--maize);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.logo-image {
  height: 3.5rem;
  width: auto;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--maize);
}

/* Navigation Links */
.nav-links {
  display: flex;
  gap: 1rem;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background: var(--nav-link);
  border-radius: 2px;
  margin: 3px 0;
}

#scroll-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: var(--bg-gradient-progress);
  z-index: 1100;
  transition: width 0.2s ease-out;
}

#progress-icon {
  position: absolute;
  right: 0;
  bottom: 100%;
  transform: translate(50%, 50%) scale(2);
  height: 1.5rem;
  width: 1.5rem;
  background-image: var(--bg-image-progress);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: absolute;
    top: 100%;
    right: 0;
    width: 40%;
    text-align: right;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 39, 76, 0.3);
    border-radius: 0 0 0 12px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-links.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.nav-links a {
    animation: cascade 0.4s ease forwards;
    opacity: 0;
}

/* Add a delay for each link to cascade in */
.nav-links a:nth-child(1) {
    animation-delay: 0.1s;
}
.nav-links a:nth-child(2) {
    animation-delay: 0.2s;
}
.nav-links a:nth-child(3) {
    animation-delay: 0.3s;
}
.nav-links a:nth-child(4) {
    animation-delay: 0.4s;
}
.nav-links a:nth-child(5) {
    animation-delay: 0.5s;
}

/* Animation for cascading links */
@keyframes cascade {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

  .hamburger {
      display: flex;
  }

  .separator {
    background-attachment: scroll;
  }
}
