/*
  ============================================
  COPYINDEX.CSS - A MODERN, RESPONSIVE REBUILD
  ============================================
  - Mobile-First: Designed for 320px up.
  - Fluid: Uses clamp() for smooth scaling.
  - Robust: Modern Flexbox layout.
  - Polished: Re-integrates original glassmorphism theme.
*/

:root {
  --primary: #181c2f;
  --secondary: #ffb86b;
  --accent: #00e6d0;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --text-main: #f4f4f4;
  --shadow-color: rgba(0, 230, 208, 0.15);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--primary);
  color: var(--text-main);
  background-image: linear-gradient(120deg, #181c2f 0%, #232a4d 70%, #2e3a5c 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

main {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(1rem, 5vw, 3rem);
}

/* ===========================================
   MOBILE-FIRST STYLES (Default: < 768px)
   =========================================== */

.hero-section {
  width: 100%;
  padding: 2rem 0; /* Add padding to the main section */
}

.hero-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem; /* Add space between cards and model */
}

.person-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.2);
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.person-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 var(--shadow-color);
}

.person-card .hero-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: var(--accent);
  margin: 0 0 0.25rem 0;
  font-weight: 700;
}

.hero-animated-text {
  font-size: clamp(1rem, 4vw, 1.15rem);
  color: var(--secondary);
  margin-bottom: 1rem;
  font-weight: 500;
  min-height: 1.5em; /* Prevents layout shift */
}

.hero-summary {
  font-size: clamp(0.95rem, 3vw, 1rem);
  line-height: 1.6;
  opacity: 0.9;
  margin: 0;
  overflow-wrap: break-word;
}

.center-icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

.center-icon img {
  width: clamp(50px, 10vw, 70px);
  height: auto;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.center-icon:hover img {
  transform: scale(1.1);
}

.model-section {
  width: 100%;
  padding: 0; /* Remove padding as it is now inside a padded section */
  display: flex;
  justify-content: center;
}

#hero-3d-bg {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

#hero-3d-bg model-viewer {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  --poster-color: transparent; /* Removes default poster */
  background-color: transparent; /* Inherits from parent */
}

/* ===========================================
   CONTENT SECTIONS (Projects, Skills, etc.)
   =========================================== */

.content-section {
  width: 100%;
  padding: 3rem 0;
  border-top: 1px solid var(--glass-border);
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  color: var(--text-main);
  margin-bottom: 2.5rem;
  font-weight: 700;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.project-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px 0 var(--shadow-color);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.project-info {
  padding: 1.5rem;
  flex-grow: 1;
}

.project-info h3 {
  font-size: 1.25rem;
  color: var(--accent);
  margin: 0 0 0.5rem 0;
}

.project-info p {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.project-tech {
  font-size: 0.9rem;
  color: var(--secondary);
  font-weight: 500;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.skill-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.skill-item:hover {
  background-color: var(--accent);
  color: var(--primary);
  transform: scale(1.05);
}

.contact-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass-bg);
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--shadow-color);
}

.contact-form button {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.contact-form button:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

.contact-info {
  text-align: center;
}

.contact-info p {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
}

.contact-info a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: var(--secondary);
}

.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 2rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-main);
  opacity: 0.7;
}


/* ===========================================
   TABLET & DESKTOP BREAKPOINTS
   =========================================== */

@media (min-width: 768px) {
  .hero-row {
    flex-direction: row;
    align-items: stretch; /* Make cards same height */
    justify-content: center;
    gap: 2rem;
  }

  .person-card {
    flex: 1 1 320px; /* Allow shrinking/growing from a base */
  }

  .center-icon {
    flex: 0 0 auto; /* Don't grow or shrink */
    margin: 0;
  }
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-container {
    flex-direction: row;
    align-items: flex-start;
  }
  .contact-form, .contact-info {
    flex: 1;
  }
  .contact-info {
    text-align: left;
    padding-left: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .hero-row {
    gap: 3rem;
  }

  .person-card .hero-photo {
    width: 140px;
    height: 140px;
  }
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
} 