/* Reset and base styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #111218;
  color: #e7e7e7;
  font-size: 18px;
  line-height: 1.7;
  min-height: 100vh;
}

/* Hero header */
.hero {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, #23234b 0%, #181826 100%);
  color: #00ffff;
  text-align: center;
  box-shadow: 0 2px 24px #00ffff22;
  margin-bottom: 36px;
}
.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 1px;
  position: relative;
  z-index: 2;
}
.gradient-text {
  background: linear-gradient(90deg, #00ffff 40%, #c77dff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px #00ffff66);
}
.cloud-logo {
  display: inline-block;
  margin-right: 14px;
  animation: floatCloud 2.5s ease-in-out infinite alternate;
}
@keyframes floatCloud {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}
.headline-underline {
  display: block;
  margin: 8px auto 0 auto;
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #00ffff, #c77dff);
  animation: underlineGlow 2s infinite alternate;
}
@keyframes underlineGlow {
  from { box-shadow: 0 0 8px #00ffff88; }
  to   { box-shadow: 0 0 16px #c77dffcc; }
}
.hero .subtitle {
  position: relative;
  color: #fffbe6;
  overflow: hidden;
  font-size: 1.4rem;
  margin-top: 16px;
}
.hero .subtitle::after {
  content: "";
  display: block;
  position: absolute;
  left: -150px;
  top: 0;
  width: 80px;
  height: 100%;
  background: linear-gradient(120deg, transparent 60%, #fffbe6cc 85%, transparent 95%);
  animation: shineMove 3s linear infinite;
}
@keyframes shineMove {
  to { left: 120%; }
}

/* Popup */
.popup {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.70);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.popup-content {
  background: #23234b;
  color: #e7e7e7;
  border-radius: 12px;
  padding: 38px 28px 26px 28px;
  max-width: 340px;
  box-shadow: 0 10px 40px #00ffff44;
  text-align: center;
  animation: popupIn 0.8s cubic-bezier(0.4,0,0.2,1);
}
@keyframes popupIn {
  from { opacity: 0; transform: scale(0.85);}
  to { opacity: 1; transform: scale(1);}
}
.popup-heading {
  color: #00ffff;
  margin-bottom: 12px;
}
.popup-content button {
  background: #00ffff;
  color: #181826;
  border: none;
  padding: 10px 30px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  margin-top: 18px;
  transition: background 0.3s, transform 0.2s;
}
.popup-content button:hover {
  background: #33ffff;
  transform: scale(1.05);
}
.popup-content img {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 0 15px #c77dff;
}

/* Section styles */
main {
  max-width: 900px;
  margin: 0 auto 0 auto;
  padding: 0 16px;
}
section {
  margin: 48px 0 0 0;
  padding-bottom: 36px;
  border-bottom: 1px solid #23234b;
  background: none;
}
section:last-of-type {
  border-bottom: none;
}
section h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #00ffff;
  border-left: 5px solid #00ffff;
  padding-left: 12px;
  margin-bottom: 22px;
  background: none;
  display: inline-block;
}

/* Fade-in Animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* Tool Grid */
.tool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}
.tool-card {
  background: #181826;
  color: #00ffff;
  border-radius: 10px;
  padding: 24px 28px;
  text-align: center;
  font-size: 1.7rem;
  min-width: 120px;
  flex: 1 1 160px;
  box-shadow: 0 1px 10px #00ffff11;
  transition: transform 0.23s, box-shadow 0.23s, background 0.18s;
  margin-bottom: 14px;
  border-left: 4px solid #00ffff;
}
.tool-card h3 {
  font-size: 1.08rem;
  margin-top: 12px;
  color: #e7e7e7;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.tool-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 8px 32px rgba(0,255,255,0.18), 0 2px 4px rgba(0,0,0,0.12);
  background: #23234b;
}
.tool-card a {
  color: #00ffff;
  text-decoration: none;
  font-size: 2.2rem;
  transition: color 0.2s;
}
.tool-card a:hover {
  color: #c77dff;
}

/* Project Grid */
.project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
}
.project-card {
  background: #181826;
  color: #e7e7e7;
  border-radius: 10px;
  padding: 26px 32px;
  text-align: left;
  min-width: 235px;
  max-width: 340px;
  flex: 1 1 260px;
  box-shadow: 0 1px 8px #00ffff10;
  transition: transform 0.23s, box-shadow 0.23s;
  margin-bottom: 14px;
  position: relative;
  border-left: 4px solid #00ffff;
}
.project-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 8px 32px rgba(0,255,255,0.18), 0 2px 4px rgba(0,0,0,0.11);
  background: #23234b;
}
.project-card a {
  color: #e7e7e7;
  text-decoration: none;
}
.project-card .project-icon {
  font-size: 2.2rem;
  color: #00ffff;
  margin-bottom: 10px;
  display: block;
}
.project-link {
  font-size: 0.95rem;
  color: #c77dff;
  font-weight: 500;
  margin-top: 8px;
  display: inline-block;
  letter-spacing: 0.3px;
}

/* Footer */
footer {
  background: linear-gradient(90deg, #0a0a0a 60%, #181826 100%);
  color: #bdbdbd;
  text-align: center;
  padding: 38px 16px 22px 16px;
  margin-top: 50px;
  font-size: 1.07rem;
  border-radius: 15px 15px 0 0;
  box-shadow: 0 -2px 20px #00ffff22;
}
footer a {
  color: #00ffff;
  text-decoration: none;
  transition: color 0.2s;
}
footer a:hover {
  color: #c77dff;
}

/* Button Styles */
button,
.resume-btn {
  background: #00ffff;
  color: #181826;
  border: none;
  border-radius: 7px;
  padding: 10px 28px;
  font-weight: bold;
  font-size: 1.07rem;
  cursor: pointer;
  box-shadow: 0 2px 12px #00ffff22;
  margin-top: 8px;
  transition: background 0.3s, transform 0.2s, color 0.2s;
  outline: none;
}
button:hover,
.resume-btn:hover {
  background: #c77dff;
  transform: scale(1.05);
  color: #fff;
}

/* Back to Top Button */
#topBtn {
  display: none;
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 9999;
  background: #00ffff;
  color: #181826;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 12px #00ffff88;
  transition: background 0.3s, transform 0.2s;
}
#topBtn:hover {
  background: #c77dff;
  color: #fff;
  transform: scale(1.11);
}

/* Links */
a {
  color: #00ffff;
  text-decoration: none;
  transition: color 0.18s;
}
a:hover {
  color: #c77dff;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 950px) {
  main, .tool-grid, .project-grid { max-width: 98vw; }
}
@media (max-width: 700px) {
  .tool-grid, .project-grid { flex-direction: column; gap: 14px;}
  section {padding: 0 8px 36px 8px;}
  .tool-card, .project-card { min-width: unset; max-width: 98vw;}
  .hero h1 { font-size: 2rem; }
}
@media (max-width: 500px) {
  .hero h1 { font-size: 1.3rem;}
  section h2 { font-size: 1.1rem;}
  .popup-content { padding: 16px 8px; }
  .tool-card, .project-card { padding: 14px 7px; }
  footer { font-size: 0.95rem; padding: 24px 6px 12px 6px;}
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  background: #181826;
}
::-webkit-scrollbar-thumb {
  background: #00ffff44;
  border-radius: 5px;
}
