:root {
  --bg: #ffffff;
  --text: #222;
  --card: #f5f5f5;
  --accent: #4f46e5;
  --accent-hover: #333;
  --accent-active: #372ec9;
  --shadow: rgba(79, 70, 229, 0.3);
  --radius: 12px;
}

body.dark {
  --bg: #121212;
  --text: #eee;
  --card: #1e1e1e;
  --accent: #8b5cf6;
  --accent-hover: #444;
  --accent-active: #693bd4;
  --shadow: rgba(139, 92, 246, 0.4);
}

html {
  font-size: 16px;
}
@media screen and (max-width: 768px) {
  html {
    font-size: 15px;
  }
}
@media screen and (max-width: 480px) {
  html {
    font-size: 14px;
  }
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.4s ease, color 0.4s ease;
}

button,
.icon-btn,
.destination-btn,
.category-buttons button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  outline: none;
}

/* Logo */
.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo {
  height: 32px;
}
.company-name {
  font-weight: bold;
  font-size: 1.2rem;
  transition: text-shadow 0.3s ease;
  text-shadow:
    0 0 8px var(--shadow),
    0 0 16px var(--shadow),
    0 0 32px var(--shadow);
}
body.dark .company-name {
  text-shadow:
    0 0 3px var(--shadow),
    0 0 6px var(--shadow),
    0 0 12px var(--shadow);
}

/* Top Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: none;
  transition: background 0.4s ease;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Icon Button Animations */
.icon-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0 6px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
  transition: color 0.3s ease;
}
.icon-btn:hover {
  color: var(--accent);
  animation: iconShakeOnce 0.3s ease, iconPulse 1.2s ease-in-out infinite;
}
.icon-btn:active,
.icon-btn:focus {
  animation: none !important;
  outline: none;
}
@keyframes iconShakeOnce {
  0% { transform: scale(1); }
  30% { transform: scale(1.1) rotate(2deg); }
  60% { transform: scale(0.95) rotate(-2deg); }
  100% { transform: scale(1); }
}
@keyframes iconPulse {
  0% { text-shadow: 0 0 0px var(--accent); }
  50% { text-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent); }
  100% { text-shadow: 0 0 0px var(--accent); }
}

/* Dropdown */
.dropdown {
  position: relative;
}
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--card);
  box-shadow: 0 2px 8px var(--shadow);
  border-radius: var(--radius);
  padding: 10px;
  z-index: 100;
  min-width: 160px;
}
.dropdown-content a,
.dropdown-content p {
  margin: 6px 0;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  display: block;
  transition: 0.2s ease;
}
.dropdown-content a:hover {
  color: var(--accent);
  font-weight: 500;
}
.dropdown:hover .dropdown-content {
  display: block;
}

/* Side Panel */
.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 260px;
  height: 100%;
  background: var(--card);
  box-shadow: -3px 0 16px var(--shadow);
  padding: 20px;
  z-index: 1000;
  transition: transform 0.4s ease;
  transform: translateX(100%);
}
.side-panel.active {
  transform: translateX(0);
}
#closePanelBtn {
  float: right;
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
}
.side-panel a {
  display: block;
  margin: 12px 0;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  transition: 0.2s ease;
}
.side-panel a:hover {
  color: var(--accent);
  font-weight: 500;
}

/* Search Bar */
.search-bar {
  padding: 1rem;
  text-align: center;
}
.search-bar input {
  padding: 10px 14px;
  width: 90%;
  max-width: 420px;
  border-radius: var(--radius);
  border: 1px solid #ccc;
  font-size: 1rem;
  background: var(--card);
  color: var(--text);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.search-bar input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent);
}

/* Buttons */
.category-buttons {
  text-align: center;
  padding: 20px 10px;
}
.category-buttons button,
.destination-btn {
  margin: 5px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 8px transparent;
  position: relative;
  z-index: 1;
  overflow: hidden;
  animation-play-state: paused;
}
.category-buttons button:hover,
.destination-btn:hover {
  animation: pulseGlow 2s ease-in-out infinite;
  animation-play-state: running;
  opacity: 0.85;
}
.category-buttons button.clicked,
.destination-btn.clicked {
  background: var(--accent-active);
  color: #fff;
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0px var(--accent); }
  50% { box-shadow: 0 0 12px var(--accent); }
  100% { box-shadow: 0 0 0px var(--accent); }
}

/* Category Grid */
.category-section {
  margin: 24px;
}
.category-title {
  font-size: 1.3rem;
  margin: 12px auto 20px;
  text-align: center;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Cards */
.project-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 6px 8px 18px var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.15);
  animation: floatPulse 5s ease-in-out infinite;

  /* ✨ Blur/aliasing fix */
  transform: perspective(1000px) translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

.project-card:hover {
  transform: perspective(1000px) scale(1.015); /* Small zoom to avoid blur */
  box-shadow: 0 0 30px var(--shadow);
  z-index: 2;
}

.project-card img {
  width: 100%;
  height: 240px;              /* ✅ Fixed height ensures consistent crop */
  object-fit: cover;          /* ✅ Zooms in slightly and fills box */
  border-radius: var(--radius);
  display: block;
  margin: 0;

  /* ✨ Keep image sharp during transform */
  image-rendering: auto;
  backface-visibility: hidden;
  transform: translateZ(0);
}



.project-card .name {
  font-weight: bold;
  font-size: 1rem;
  margin: 8px 0 4px;
  text-align: center;
  color: var(--text);
  text-shadow:
    0 0 2px var(--shadow),
    0 0 6px var(--shadow),
    0 0 12px var(--shadow);
  transition: text-shadow 0.3s ease, color 0.3s ease;
}

.project-card .timestamp {
  font-size: 0.8rem;
  opacity: 0.6;
  text-align: right;
  margin-top: auto;
}

/* Responsive Grid */
.mobile-only {
  display: none;
}
@media screen and (max-width: 768px) {
  .mobile-only {
    display: inline;
  }
  .dropdown {
    display: none;
  }
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-card {
    height: auto;
    max-height: none;
  }
  .project-card img {
    height: 160px;
    flex-grow: 0;
  }
}
@media screen and (max-width: 480px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
  .search-bar input {
    width: 95%;
  }
  .logo {
    height: 24px;
  }
  .company-name {
    font-size: 1rem;
  }
  .top-bar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .logo-wrapper {
    flex-direction: row;
    align-items: center;
  }
  .top-actions {
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .category-buttons {
    padding: 12px 6px;
  }
  .category-buttons button,
  .destination-btn {
    padding: 10px 14px;
    font-size: 0.95rem;
  }
}

/* Misc */
.timestamp-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text);
  opacity: 0.65;
  margin-top: 8px;
}
.side-panel h3:not(:first-of-type) {
  border-top: 1px solid #ccc;
  padding-top: 12px;
  margin-top: 24px;
}
.footer {
  text-align: center;
  padding: 16px;
  font-size: 0.9rem;
  color: #888;
  border-top: 1px solid #ccc;
  margin-top: auto;
}

/* Sticky Footer */
html, body {
  height: 100%;
}
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1;
}

/* Touch Device Fix */
@media (pointer: coarse) {
  .icon-btn:hover,
  .destination-btn:hover,
  .category-buttons button:hover {
    background: var(--accent);
    box-shadow: none !important;
    animation: none !important;
  }
}
/* About Section */
.about-section {
  max-width: 860px;
  margin: 80px auto 20px; /* ⬅ more top spacing, less bottom spacing */
  padding: 2rem;
  color: var(--text);
  text-align: center;
  transition: background 0.3s ease, color 0.3s ease;
}

.about-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
  text-shadow: 0 0 3px var(--shadow);
}

.about-section p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.about-section ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
}

.about-section ul li {
  padding: 0.4rem 0;
  font-size: 1rem;
  color: var(--text);
  transition: color 0.3s ease;
}

body.dark .about-section h2,
body.dark .about-section p,
body.dark .about-section ul li {
  color: var(--text);
}

@media (max-width: 768px) {
  .about-section {
    padding: 1.5rem;
    margin: 60px auto 16px; /* Adjusted margin for smaller screens */
  }

  .about-section h2 {
    font-size: 1.6rem;
  }

  .about-section p,
  .about-section ul li {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .about-section {
    padding: 1rem;
    margin: 40px auto 12px; /* Adjusted margin for smallest screens */
  }

  .about-section h2 {
    font-size: 1.4rem;
  }

  .about-section p,
  .about-section ul li {
    font-size: 0.9rem;
  }
}

