/* Reset & Base Styles */

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

:root {
  --bg-dark: #0a0a0a;
  --bg-dark-2: #141414;
  --bg-dark-3: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent: #3a3a3a;
  --accent-hover: #4a4a4a;
  --glass-bg: rgba(26, 26, 26, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

/* Smooth Scroll with Inertia */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: scroll;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== BOOT SEQUENCE STYLES ===== */
.boot-sequence {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 10000;
  color: #00ff88;
  font-family: 'Consolas', 'Courier New', monospace;
  overflow: hidden;
}

/* SKIP LOADING BUTTON - NEW! */
.skip-loading-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  padding: 12px 24px;
  background: rgba(0, 255, 136, 0.2);
  border: 1px solid #00ff88;
  border-radius: 8px;
  color: #00ff88;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.skip-loading-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.skip-loading-btn:hover {
  background: rgba(0, 255, 136, 0.4);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.skip-loading-btn:active {
  transform: scale(0.98);
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* Logo Screen with Fade-in Animation */
#logo {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

#logo img {
  width: 320px;
  opacity: 0;
  animation: logoFadeIn 2s ease-in-out forwards, pulse 2s ease-in-out infinite 2s;
}

@keyframes logoFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

/* Boot Manager Screen */
.boot {
  text-align: left;
  border: 1px solid #00ff88;
  padding: 30px;
  width: 600px;
  max-width: 90%;
}

.option {
  border: 1px solid #00ff88;
  padding: 12px;
  margin-top: 20px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}

.option.active {
  background: #00ff88;
  color: black;
}

.option:hover {
  background: rgba(0, 255, 136, 0.2);
}

/* Console Screen - MOBILE FRIENDLY */
#console {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 40px;
  overflow: hidden;
  height: 100%;
}

.console {
  width: 100%;
  max-width: 100%;
  text-align: left;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: #00ff88 transparent;
}

.console::-webkit-scrollbar {
  width: 8px;
}

.console::-webkit-scrollbar-track {
  background: transparent;
}

.console::-webkit-scrollbar-thumb {
  background: #00ff88;
  border-radius: 4px;
}

.console::-webkit-scrollbar-thumb:hover {
  background: #00cc6f;
}

.line {
  margin: 6px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* Blinking Cursor */
.cursor {
  display: inline-block;
  width: 10px;
  background: #00ff88;
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  to {
    visibility: hidden;
  }
}

input {
  background: none;
  border: none;
  color: #00ff88;
  outline: none;
  font-family: inherit;
  font-size: inherit;
  width: auto;
  max-width: 100%;
  display: inline-block;
}

.fadeout {
  animation: fadeout 1s forwards;
}

@keyframes fadeout {
  to {
    opacity: 0;
  }
}

#terminal {
  scroll-behavior: smooth;
}

/* Portfolio Content (Initially Hidden) */
.portfolio-content {
  display: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.portfolio-content.visible {
  opacity: 1;
}

/* Background Gradient Effect */
.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(58, 58, 58, 0.15) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  transition: background 0.3s ease;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: padding 0.3s ease, background 0.3s ease;
}

.navbar.scrolled {
  padding: 1rem 3rem;
  background: rgba(10, 10, 10, 0.95);
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo {
  height: 40px;
  width: auto;
  transition: var(--transition);
  filter: brightness(1);
}

.logo:hover {
  filter: brightness(1.2);
  transform: scale(1.05);
}

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

.dropdown {
  position: relative;
}

.dropbtn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
}

.dropbtn:hover {
  background: var(--accent);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 200px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

.dropdown:hover .dropdown-content,
.dropdown-content:hover {
  display: block;
  animation: fadeIn 0.3s ease;
}

.dropdown-content a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

.dropdown-content a:hover {
  background: var(--accent);
}

.get-in-touch {
  padding: 0.5rem 1.5rem;
  background: var(--accent);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  transition: var(--transition);
  border: 1px solid var(--glass-border);
}

.get-in-touch:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(20px);
  z-index: 99;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  font-size: 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  padding: 1rem;
  transition: var(--transition);
}

.mobile-link:hover {
  color: var(--text-secondary);
  transform: translateX(10px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 3rem 3rem;
  position: relative;
  overflow: hidden;
}

.hero-container {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(300px, 500px) 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-image {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.hero-image img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

.hero-text {
  z-index: 2;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  line-height: 1;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.4;
}

.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.resume-btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.1);
}

/* Skills Section */
.skills-section {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 4rem;
  font-size: 1.1rem;
}

.skills-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.carousel-arrow {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.carousel-arrow:hover {
  background: var(--accent);
  transform: scale(1.1);
}

.category-display {
  flex: 1;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 3rem;
  backdrop-filter: blur(20px);
  position: relative;
}

.category-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.icons-slider {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.skill-icon {
  font-size: 2rem;
  transition: var(--transition);
}

.skill-icon:hover {
  transform: scale(1.2) rotate(5deg);
}

.category-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

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

.project-preview {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-dark-2);
  border: 1px solid var(--glass-border);
}

.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-projects {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.featured-projects a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: var(--transition);
  border-left: 2px solid transparent;
  padding-left: 1rem;
}

.featured-projects a:hover {
  color: var(--text-primary);
  border-left-color: var(--text-primary);
  transform: translateX(5px);
}

.content-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.category-description {
  color: var(--text-secondary);
  line-height: 1.8;
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tool-tag {
  padding: 0.5rem 1rem;
  background: var(--accent);
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid var(--glass-border);
}

.cta-btn {
  align-self: flex-start;
  padding: 1rem 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.cta-btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* Smooth Carousel Progress Bar */
.carousel-progress {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 2rem;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--text-primary), var(--text-secondary));
  transition: none;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: var(--text-primary);
  transform: scale(1.3);
}

/* Recommendations Section */
.recommendations-section {
  padding: 6rem 0;
  background: var(--bg-dark-2);
}

.recommendations-scroll-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.scroll-arrow {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
  z-index: 2;
}

.scroll-arrow:hover {
  background: var(--accent);
  transform: scale(1.1);
}

.recommendations-carousel-horizontal {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 1rem 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.recommendations-carousel-horizontal::-webkit-scrollbar {
  display: none;
}

.recommendation-card {
  min-width: 350px;
  max-width: 350px;
  height: 280px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(20px);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.recommendation-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-hover);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.rec-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.rec-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 600;
  flex-shrink: 0;
}

.rec-info {
  flex: 1;
  min-width: 0;
}

.rec-info h4 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.rec-text {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  line-clamp: 5;
  overflow: hidden;
  flex: 1;
}

.linkedin-card {
  min-width: 350px;
  max-width: 350px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.linkedin-card:hover {
  background: var(--accent-hover);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.linkedin-card h3 {
  font-size: 1.5rem;
}

/* Contact Section */
.contact-section {
  padding: 6rem 0;
  text-align: center;
}

.contact-subtitle {
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.contact-btn.primary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.contact-btn.primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.1);
}

.contact-btn.secondary {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.contact-btn.secondary:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* Footer */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--glass-border);
  background: var(--bg-dark-2);
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  color: var(--text-secondary);
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

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

.social-links a:hover {
  color: var(--text-primary);
  transform: translateY(-3px);
}

/* Scroll Animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(50px) scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 968px) {
  .navbar {
    padding: 1rem 2rem;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .hero {
    padding: 6rem 2rem 3rem;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-image {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }

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

  .category-content {
    grid-template-columns: 1fr;
  }

  .category-display {
    padding: 2rem 1.5rem;
  }

  .recommendation-card,
  .linkedin-card {
    min-width: 300px;
    max-width: 300px;
  }

  .footer .container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 5rem 1rem 2rem;
  }

  .skills-section,
  .recommendations-section,
  .contact-section {
    padding: 3rem 0;
  }

  .carousel-arrow,
  .scroll-arrow {
    width: 40px;
    height: 40px;
  }

  .recommendation-card,
  .linkedin-card {
    min-width: 280px;
    max-width: 280px;
  }

  .skill-icon {
    font-size: 1.5rem;
  }

  #logo img {
    width: 240px;
  }

  .boot {
    width: 90%;
    padding: 20px;
  }

  #console {
    padding: 20px;
  }

  .console {
    font-size: 0.85rem;
    padding-right: 5px;
  }

  .line {
    word-break: break-word;
  }

  .skip-loading-btn {
    top: 10px;
    right: 10px;
    padding: 10px 18px;
    font-size: 0.8rem;
  }
}

/* Spacer between sections to prevent jitter */
.section-spacer {
  height: 80px;
  background: transparent;
}

/* Fix skills section height to prevent jitter */
.skills-section .category-content {
  min-height: 450px;
}

/* Smooth auto-scroll for recommendations */
.recommendations-carousel-horizontal {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 1rem 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}

.recommendation-card,
.linkedin-card {
  scroll-snap-align: start;
}

/* 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;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .mobile-menu,
  .footer,
  .boot-sequence {
    display: none;
  }
}
