/* =====================================
   Global Styles
===================================== */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  color: #fff;
  background: #0a0a0a;
  overflow-x: hidden;
}

* { box-sizing: border-box; }

/* =====================================
   Header / Navigation
===================================== */
header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  padding: 15px 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  transition: padding 0.3s ease, background 0.3s ease;
}

header.shrink { padding: 8px 30px; background: rgba(0,0,0,0.9); }

header nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  position: relative;
}

header nav a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: #00e0ff;
  transition: width 0.3s;
}

header nav a:hover::after,
header nav a.active::after { width: 100%; }


/* Resume Dropdown in Nav */
.download-resume-dropdown {
  position: relative;
  display: inline-block;
}

.download-resume-dropdown .download-btn {
  background: none;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.download-resume-dropdown .download-btn:focus {
  outline: none; /* remove the blue border */
}

.download-resume-dropdown .dropdown-content {
  display: none;
  position: absolute;
  background: #111;
  min-width: 160px;
  box-shadow: 0 4px 10px rgba(0,224,255,0.5);
  border-radius: 8px;
  z-index: 100;
  margin-top: 5px;
  right: 0;
}

.download-resume-dropdown.show .dropdown-content {
  display: block;
}

.download-resume-dropdown .dropdown-content a {
  color: #fff;
  padding: 10px 15px;
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.download-resume-dropdown .dropdown-content a:hover {
  background: rgba(0, 224, 255, 0.2);
  color: #00e0ff;
}




/* =====================================
   Landing Section
===================================== */
.landing {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
  z-index: 1;
  background: #0d0d0d;
}

.landing-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
}

.portrait {
  width: 30vw;
  height: 30vw;
  max-width: 220px;
  max-height: 220px;
  border-radius: 50%;
  background: url('./images/Ryan2.jpeg') center/cover no-repeat;
  border: 4px solid #00e0ff;
  box-shadow: 0 0 30px rgba(0,224,255,0.6);
  margin-bottom: 20px;
  z-index: 2;
}

.glitch-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 0 5px #00e0ff;
  overflow: hidden;
  border-right: .15em solid #00e0ff;
  white-space: nowrap;
  letter-spacing: .15em;
  animation: typing 2.5s steps(20, end), blink-caret .75s step-end infinite;
}

@keyframes typing { from { width: 0 } to { width: 18ch; } }
@keyframes blink-caret { 50% { border-color: transparent; } }

/* =====================================
   Sections
===================================== */
section { padding: 8% 10%; position: relative; z-index: 1; }

section h2 { 
  font-family: 'Orbitron', sans-serif; 
  font-size: clamp(1.5rem, 3vw, 2rem); 
  margin-bottom: 40px; 
}

/* Neon dividers between sections */
section + section::before {
  content: "";
  display: block;
  height: 2px;
  width: 60%;
  margin: 40px auto;
  background: #00e0ff;
  opacity: 0.2;
  box-shadow: 0 0 5px #00e0ff;
  border-radius: 2px;
  transition: opacity 0.3s, box-shadow 0.3s;
}

.section-divider-active {
  opacity: 0.4;
  box-shadow: 0 0 15px #00e0ff;
}
/* Keep original section padding */
.about-me {
  padding: 8% 10%;  /* original spacing */
  position: relative;
}

/* About container for flex layout */
.about-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
}

/* Side image styling */
.about-image img {
  width: 300px;
  max-width: 100%;
  border-radius: 12px;
  border: 3px solid #00e0ff;
  box-shadow: 0 0 30px rgba(0,224,255,0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-image img:hover {
  transform: scale(1.05) rotate(-1deg);
  box-shadow: 0 0 40px rgba(0,224,255,0.7);
}

/* Text content */
.about-text {
  flex: 1;
  min-width: 250px;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  line-height: 1.6;
}

/* Optional decorative lines - keep them subtle so layout doesn't break */
.about-me::before, .about-me::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 80%;
  top: 10%;
  background: #00e0ff;
  opacity: 0.1;  /* lighter to prevent overpowering layout */
  pointer-events: none;
}

.about-me::before { left: 0; }
.about-me::after { right: 0; }

/* Container for shapes */
.floating-shapes {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* shapes don’t interfere with clicking */
  overflow: hidden;
  z-index: 0;
}

/* Individual shapes */
.floating-shapes .shape {
  position: absolute;
  width: 15px;
  height: 15px;
  background: #00e0ff;
  border-radius: 50%;
  opacity: 0.3;
  animation: float 6s ease-in-out infinite;
}

/* Different positions and animation delays */
.shape-1 { top: 20%; left: 10%; animation-delay: 0s; }
.shape-2 { top: 50%; left: 70%; animation-delay: 2s; }
.shape-3 { top: 80%; left: 40%; animation-delay: 4s; }

/* Floating animation */
@keyframes float {
  0% { transform: translateY(0px) translateX(0px); opacity: 0.3; }
  25% { transform: translateY(-15px) translateX(5px); opacity: 0.4; }
  50% { transform: translateY(10px) translateX(-5px); opacity: 0.3; }
  75% { transform: translateY(-10px) translateX(10px); opacity: 0.4; }
  100% { transform: translateY(0px) translateX(0px); opacity: 0.3; }
}

/* Ensure About Me content is above shapes */
.about-container {
  position: relative;
  z-index: 1;
}


/* Timeline (Work Experience) */
.timeline { position: relative; margin: 0; padding: 0; }

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #00e0ff;
}

.timeline-item {
  margin-left: 60px;
  margin-bottom: 20px;
  position: relative;
}

.timeline-item::before {
  content: '\f111';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: -43px;
  top: 0;
  color: #00e0ff;
}

.timeline-item h3 { margin: 0; font-size: 1.2rem; color: #00e0ff; }
.timeline-item span { font-size: 0.9rem; opacity: 0.8; }
.timeline-item p { margin-top: 8px; font-size: 0.95rem; line-height: 1.4; }

/* Education Section */
.education-item { margin-bottom: 20px; }
.education-item h3 { color: #00e0ff; margin-bottom: 5px; }
.certifications img { height: 100px; margin-right: 10px; }

/* Projects Section */
#projects {
  padding: 8% 10% 300px 10%; /* top, right, bottom, left */
}
/* Projects Grid */
.projects-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
  gap: 20px; 
}

.project-card {
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border: 1px solid #00e0ff;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover { transform: translateY(-5px); box-shadow: 0 0 20px #00e0ff; }

.project-card h3 { color: #00e0ff; margin-bottom: 10px; font-size: 1.1rem; text-transform: uppercase; }
.project-card p { color: #fff; font-size: 0.9rem; line-height: 1.4; min-height: 50px; }

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show { display: flex; opacity: 1; }

.modal-content {
  background: #111;
  padding: 30px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  position: relative;
  color: #fff;
}

.modal-content a { color: #00e0ff; text-decoration: underline; }
.close-btn { position: absolute; top: 15px; right: 15px; font-size: 1.5rem; cursor: pointer; color: #fff; }

/* About Me Paragraphs */
.about-me p { margin-bottom: 15px; font-size: clamp(0.9rem, 2.5vw, 1rem); line-height: 1.6; }

/* Footer */
footer { text-align: center; padding: 30px; background: #000; }
footer a { margin: 0 10px; color: #fff; font-size: 1.5rem; text-decoration: none; }

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 45px;
  height: 45px;
  background-color: #00e0ff;
  color: #0a0a0a;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 0 15px rgba(0,224,255,0.7);
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 0.3s, transform 0.3s;
}

#back-to-top.show { opacity: 1; transform: translateY(0); }
#back-to-top:hover { transform: scale(1.15); box-shadow: 0 0 25px #00e0ff, 0 0 50px rgba(0,224,255,0.4); }

/* =====================================
   Responsive
===================================== */
@media (max-width: 1024px) {
  section { padding: 6% 8%; }
  .timeline-item { margin-left: 40px; }
  .glitch-title { font-size: clamp(1.5rem, 6vw, 2rem); }
}

@media (max-width: 768px) {
  section { padding: 5% 5%; }
  .timeline-item { margin-left: 20px; }
  .portrait { width: 40vw; height: 40vw; max-width: 180px; max-height: 180px; }
  header nav a { margin-left: 10px; font-size: 0.9rem; }
  .about-container { flex-direction: column; gap: 20px; }
  .about-image img { width: 60%; margin: 0 auto; display: block; }
}

@media (max-width: 480px) {
  .glitch-title { font-size: clamp(1.2rem, 8vw, 1.5rem); }
  .landing-content { padding: 0 10px; }
  header { padding: 10px; }
  header { flex-direction: column; align-items: center; }
  .logo { width: 100%; text-align: center; margin-bottom: 5px; }
  header nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
  header nav a:nth-child(-n+3) { flex: 1 1 auto; text-align: center; }
  header nav a:nth-child(n+4) { flex: 1 1 auto; text-align: center; }
  html { scroll-padding-top: 90px; }
  .timeline { padding-left: 20px; }
  .timeline::before { left: 10px; }
  .timeline-item { margin-left: 40px; }
  .timeline-item::before { left: -54px; font-size: 10px; }
}
