/* Modern CSS Variables */
:root {
  --primary-color: #009FE5;
  --secondary-color: #005B95;
  --accent-color: #FFD700;
  --text-color: #2D3748;
  --text-light: #4A5568;
  --background-color: #F7FAFC;
  --white-color: #FFFFFF;
  --footer-bg: #2c2c2c;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --border-radius: clamp(8px, 2vw, 12px);
  --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: min(1200px, 95vw);
  --header-padding: clamp(1.5rem, 5vw, 3rem);
  --content-spacing: clamp(1rem, 3vw, 2rem);
}

/* Enhanced Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: clamp(14px, 1vw, 16px);
  scroll-behavior: smooth;
}

body {
  font-family: 'Rubik', sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all var(--transition);
  touch-action: manipulation;
}

a:hover {
  color: var(--secondary-color);
}

/* Enhanced Header Styles */
.header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: var(--header-padding);
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 40%, transparent 50%);
  animation: shimmer 6s infinite linear;
  pointer-events: none;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.wrapper {
  width: min(var(--max-width), 100%);
  margin: 0 auto;
  position: relative;
  padding: 0 var(--content-spacing);
}

.header .wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.logo-top img {
  width: clamp(120px, 30vw, 180px);
  margin: 0 auto;
}

.header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--accent-color);
  line-height: 1.2;
  text-align: center;
}

.intro-text {
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.6;
  color: var(--white-color);
  text-align: center;
  max-width: 65ch;
  margin: 0 auto;
}

.header-expertise {
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--white-color);
  box-shadow: var(--shadow-md);
}

.header-expertise h3 {
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  text-align: center;
}

.header-expertise ul {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.header-expertise li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.header-expertise li::before {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(20px, 5vw, 24px);
  height: clamp(20px, 5vw, 24px);
  background: var(--accent-color);
  color: var(--secondary-color);
  border-radius: 50%;
  font-weight: bold;
  flex-shrink: 0;
}

.closing-statement {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  font-style: italic;
  color: var(--accent-color);
  text-align: center;
  max-width: min(800px, 90%);
  margin: clamp(2rem, 5vw, 3rem) auto 0;
}

/* Enhanced Content Section */
#content {
  padding: clamp(3rem, 8vw, 5rem) var(--content-spacing);
  flex: 1;
}

#content .wrapper {
  text-align: center;
}

.projects-title {
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  color: var(--text-color);
  font-weight: bold;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  position: relative;
}

.projects-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 1rem auto 0;
  border-radius: 2px;
}

.items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(1.5rem, 4vw, 2rem);
}

.item {
  background: var(--white-color);
  border-radius: var(--border-radius);
  padding: clamp(1.5rem, 4vw, 2rem);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.item img {
  width: clamp(80px, 30%, 150px);
  margin: 0 auto 1rem;
  border-radius: var(--border-radius);
  aspect-ratio: 1;
  object-fit: contain;
}

.item h4 {
  font-size: clamp(1.2rem, 3vw, 1.4rem);
  color: var(--text-color);
  text-align: center;
}

.item p {
  color: var(--text-light);
  line-height: 1.6;
  flex-grow: 1;
  font-size: clamp(0.9rem, 2vw, 1rem);
  text-align: center;
}

.store-links {
  display: flex;
  gap: clamp(0.5rem, 2vw, 1rem);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: auto;
}

.store-links a {
  padding: clamp(0.6rem, 2vw, 0.8rem) clamp(1rem, 3vw, 1.5rem);
  border-radius: var(--border-radius);
  color: var(--white-color);
  text-align: center;
  transition: all var(--transition);
  flex: 1;
  min-width: clamp(140px, 30%, 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.store-links a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.apple-store-link { background: linear-gradient(145deg, #333, #000); }
.google-play-link { background: linear-gradient(145deg, #34a853, #4285F4); }
.website-link { background: linear-gradient(145deg, #5cb85c, #4CAF50); }
.chrome-extension-link { background: linear-gradient(145deg, #0f56cf, rgb(69, 117, 229)); }

.coming-soon-link { 
  background: linear-gradient(145deg, #9CA3AF, #6B7280);
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
  position: relative;
}

.coming-soon-link:hover {
  transform: none;
  box-shadow: none;
}

/* Enhanced Footer Styles */
.footer {
  background: var(--footer-bg);
  color: var(--white-color);
  padding: clamp(3rem, 6vw, 4rem) var(--content-spacing);
  position: relative;
  margin-top: auto;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.footer .wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: clamp(2rem, 5vw, 3rem);
}

.info-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.info-bottom img {
  width: clamp(120px, 30vw, 180px);
  margin-bottom: 1.5rem;
}

.info-bottom p {
  color: #bbbbbb;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  line-height: 1.6;
}

.footer-middle h4,
.social h4 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.footer-middle p {
  color: #bbbbbb;
  margin-bottom: 2rem;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.social-buttons {
  display: flex;
  gap: clamp(0.5rem, 2vw, 1rem);
  flex-wrap: wrap;
  justify-content: center;
}

.social-button {
  width: clamp(35px, 8vw, 40px);
  height: clamp(35px, 8vw, 40px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white-color);
  transition: all var(--transition);
}

.social-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.twitter { background: #1DA1F2; }
.facebook { background: #1877F2; }
.linkedin { background: #0A66C2; }

/* Touch Device Optimizations */
@media (hover: none) {
  .item:hover {
    transform: none;
  }
  
  .store-links a:hover {
    transform: none;
  }
  
  .social-button:hover {
    transform: none;
  }
}
.email { background: #EA4335; }

/* Print Styles */
@media print {
  .header {
    background: none;
    color: var(--text-color);
    padding: 1rem;
  }

  .header::before {
    display: none;
  }

  .store-links,
  .social {
    display: none;
  }

  .item {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}