/* ========================================
   CSS VARIABLES
   ======================================== */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #00a2ff;
  --accent-hover: #00d0ff;
  --border: #27272a;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* ========================================
   BASE STYLES
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--accent);
  color: var(--bg-primary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

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

ul {
  list-style: none;
}

/* ========================================
   NAVIGATION
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-resume {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
}

.nav-resume:hover {
  background-color: rgba(100, 255, 218, 0.1);
}

@media (max-width: 768px) {
  .nav-content {
    padding: 1rem;
  }
  
  .nav-links {
    display: none;
  }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 2rem;
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 80px;
  width: 100%;
}

.hero-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
}

.hero-text {
  flex: 1;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-name {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-description {
  max-width: 540px;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-links {
  display: flex;
  gap: 1.25rem;
}

.hero-link {
  color: var(--text-secondary);
  padding: 0.5rem;
  transition: var(--transition);
}

.hero-link:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

/* Hero Image */
.hero-image {
  flex-shrink: 0;
}

.hero-image-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
}

.hero-image-wrapper img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  filter: grayscale(20%);
  transition: var(--transition);
  z-index: 1;
  background-color: var(--bg-card);
}

.hero-image-wrapper:hover img {
  filter: grayscale(0%);
}

.hero-image-border {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--accent);
  border-radius: 8px;
  transition: var(--transition);
  z-index: 0;
}

.hero-image-wrapper:hover .hero-image-border {
  top: 10px;
  left: 10px;
}

@media (max-width: 900px) {
  .hero-main {
    flex-direction: column-reverse;
    text-align: center;
    gap: 3rem;
  }
  
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-links {
    justify-content: center;
  }
  
  .hero-image-wrapper {
    width: 220px;
    height: 220px;
  }
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
  padding: 100px 2rem;
}

.section-content {
  max-width: 1000px;
  margin: 0 auto;
}

.section-title {
  display: flex;
  align-items: center;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2.5rem;
}

.section-title::after {
  content: '';
  display: block;
  height: 1px;
  width: 300px;
  background-color: var(--border);
  margin-left: 1.25rem;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--accent);
  margin-right: 0.75rem;
}

@media (max-width: 768px) {
  .section {
    padding: 80px 1.5rem;
  }
  
  .section-title::after {
    width: 100px;
  }
}

/* ========================================
   EXPERIENCE SECTION
   ======================================== */

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.experience-item {
  padding: 1.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: var(--transition);
}

.experience-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.experience-header {
  display: flex;
  gap: 1.5rem; /* Space between logo and text */
  align-items: flex-start;
  margin-bottom: 1rem;
}

.experience-logo {
  flex-shrink: 0; /* Prevents logo from squishing */
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05); /* Placeholder background */
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.experience-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Ensures logo isn't cropped weirdly */
  padding: 4px; /* Optional: gives logo some breathing room inside its box */
}

/* Adjust title row to take up remaining space */
.experience-title-row {
  flex-grow: 1;
}

/* Mobile Adjustment */
@media (max-width: 480px) {
  .experience-header {
    gap: 1rem;
  }
  .experience-logo {
    width: 40px;
    height: 40px;
  }
}

.experience-role {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.experience-company {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

.experience-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.experience-details {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}

.experience-details li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.experience-details li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.experience-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.experience-tech span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background-color: rgba(100, 255, 218, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

/* ========================================
   PROJECTS SECTION
   ======================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.project-card.featured {
  grid-column: span 1;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.project-folder {
  color: var(--accent);
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

.project-links a {
  color: var(--text-secondary);
  transition: var(--transition);
}

.project-links a:hover {
  color: var(--accent);
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.project-award {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.project-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.project-tech-list span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ========================================
   SKILLS SECTION
   ======================================== */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.skill-category h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

.skill-category ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-category li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding-left: 1.25rem;
  position: relative;
}

.skill-category li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ========================================
   CONTACT SECTION
   ======================================== */

.section-contact {
  text-align: center;
  padding: 150px 2rem;
}

.contact-content {
  max-width: 600px;
}

.contact-overline {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.contact-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.contact-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.contact-button {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 1rem 2rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  transition: var(--transition);
}

.contact-button:hover {
  background-color: rgba(100, 255, 218, 0.1);
  color: var(--accent);
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  padding: 2rem;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-credit {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes drawBorder {
  from {
    opacity: 0;
    transform: translate(25px, 25px);
  }
  to {
    opacity: 1;
    transform: translate(15px, 15px);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Hero Animations */
.hero-greeting,
.hero-name,
.hero-tagline,
.hero-description,
.hero-links,
.hero-image {
  opacity: 0;
}

.hero-greeting.animate {
  animation: fadeInUp 0.6s ease-out forwards;
}

.hero-name.animate {
  animation: fadeInUp 0.6s ease-out 0.1s forwards;
}

.hero-tagline.animate {
  animation: fadeInUp 0.6s ease-out 0.2s forwards;
}

.hero-description.animate {
  animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

.hero-links.animate {
  animation: fadeInUp 0.6s ease-out 0.4s forwards;
}

.hero-image.animate {
  animation: scaleIn 0.7s ease-out 0.5s forwards;
}

.hero-image.animate .hero-image-border {
  animation: drawBorder 0.5s ease-out 0.8s forwards;
  opacity: 0;
}

/* Hero Image Float on Idle */
.hero-image-wrapper:not(:hover) img {
  animation: float 6s ease-in-out infinite;
}

.hero-image-wrapper:hover img {
  animation: none;
}
/* Hero Carousel */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.hero-carousel img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  filter: grayscale(20%);
}

.hero-carousel img.active {
  opacity: 1;
}

.hero-image-wrapper:hover .hero-carousel img {
  filter: grayscale(0%);
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.indicator.active {
  background-color: var(--accent);
}

.indicator:hover {
  transform: scale(1.2);
}

/* Social Links Stagger */
.hero-links.animate .hero-link {
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards;
}

.hero-links.animate .hero-link:nth-child(1) { animation-delay: 0.5s; }
.hero-links.animate .hero-link:nth-child(2) { animation-delay: 0.6s; }
.hero-links.animate .hero-link:nth-child(3) { animation-delay: 0.7s; }

/* Section Animations */
.section-content {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Experience Items Stagger */
.experience-item {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.section-content.visible .experience-item {
  opacity: 1;
  transform: translateX(0);
}

.section-content.visible .experience-item:nth-child(1) { transition-delay: 0.1s; }
.section-content.visible .experience-item:nth-child(2) { transition-delay: 0.2s; }
.section-content.visible .experience-item:nth-child(3) { transition-delay: 0.3s; }
.section-content.visible .experience-item:nth-child(4) { transition-delay: 0.4s; }

/* Project Cards Stagger */
.project-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out, border-color 0.25s ease;
}

.section-content.visible .project-card {
  opacity: 1;
  transform: translateY(0);
}

.section-content.visible .project-card:nth-child(1) { transition-delay: 0.1s; }
.section-content.visible .project-card:nth-child(2) { transition-delay: 0.2s; }
.section-content.visible .project-card:nth-child(3) { transition-delay: 0.3s; }

/* Project Card Hover Enhancement */
.project-card:hover {
  transform: translateY(-8px);
}

.project-card:hover .project-folder {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Skill Categories Stagger */
.skill-category {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.section-content.visible .skill-category {
  opacity: 1;
  transform: translateY(0);
}

.section-content.visible .skill-category:nth-child(1) { transition-delay: 0.1s; }
.section-content.visible .skill-category:nth-child(2) { transition-delay: 0.2s; }
.section-content.visible .skill-category:nth-child(3) { transition-delay: 0.3s; }
.section-content.visible .skill-category:nth-child(4) { transition-delay: 0.4s; }

/* Contact Section Animation */
.contact-content {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.contact-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Button Hover Effects */
.contact-button {
  position: relative;
  overflow: hidden;
}

.contact-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(100, 255, 218, 0.2), transparent);
  transition: left 0.5s ease;
}

.contact-button:hover::before {
  left: 100%;
}

/* Nav Resume Button Shine */
.nav-resume {
  position: relative;
  overflow: hidden;
}

.nav-resume::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(100, 255, 218, 0.15), transparent);
  transition: left 0.5s ease;
}

.nav-resume:hover::before {
  left: 100%;
}

/* Tech Tags Hover */
.experience-tech span,
.project-tech-list span {
  transition: color 0.25s ease, transform 0.25s ease;
}

.experience-tech span:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* Skill List Items Hover */
.skill-category li {
  transition: color 0.25s ease, transform 0.25s ease;
}

.skill-category li:hover {
  color: var(--text-primary);
  transform: translateX(5px);
}

/* Section Title Line Animation */
.section-title::after {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s ease-out;
}

.section-content.visible .section-title::after {
  transform: scaleX(1);
}

/* Footer Links Hover */
.footer-links a {
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.footer-links a:hover::after {
  width: 100%;
}

/* Cursor Glow Effect (Optional - Desktop Only) */
@media (min-width: 769px) {
  .cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(100, 255, 218, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
  }
}

.player {
  position: fixed;
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 6px;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 0 10px var(--accent), 0 0 20px rgba(0, 162, 255, 0.3);
  transition: box-shadow 0.2s ease;
}

.player::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  width: 8px;
  height: 8px;
  background: var(--bg-primary);
  border-radius: 50%;
}

.player::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--bg-primary);
  border-radius: 50%;
}

.spawn-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.spawn-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 162, 255, 0.4);
}