/**
 * Portfolio Website - Component Styles
 * Reusable UI components including buttons, cards, and interactive elements
 * Author: Münevver Aslan
 */

/* Minimal Vertical Navigation */
.vertical-nav {
  position: fixed;
  top: 2rem;
  right: 3rem;
  z-index: var(--z-tooltip);
  /* Higher z-index to ensure it's always on top */
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: auto;
  /* Ensure navigation can receive click events */
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-end;
  pointer-events: auto;
  /* Ensure nav links can receive click events */
}

.nav-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  font-weight: 400;
  font-family: 'Resonate', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  opacity: 1;
  transform: translateX(0);
  animation: slideInNav 0.6s ease-out forwards;
  pointer-events: auto;
  padding: var(--space-2) 0 var(--space-2) var(--space-5);
  /* 8px 0 8px 20px */
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: var(--space-1);
  /* 4px */
  height: var(--space-1);
  /* 4px */
  border-radius: 50%;
  background: var(--pure-white);
  opacity: 0;
  transition: all 0.3s ease;
}

/* Keep animation delays but start from visible state */
.nav-link:nth-child(1) {
  animation-delay: 0.1s;
  opacity: 1;
  transform: translateX(0);
}

.nav-link:nth-child(2) {
  animation-delay: 0.2s;
  opacity: 1;
  transform: translateX(0);
}

.nav-link:nth-child(3) {
  animation-delay: 0.3s;
  opacity: 1;
  transform: translateX(0);
}

.nav-link:nth-child(4) {
  animation-delay: 0.4s;
  opacity: 1;
  transform: translateX(0);
}

@keyframes slideInNav {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.nav-link:hover {
  color: var(--color-text-primary);
  transform: translateX(0px);
}

.nav-link:hover::before {
  opacity: 0.6;
  background: var(--pure-white);
  transform: translateY(-50%) scale(1.2);
}

.nav-link.active {
  color: var(--color-text-primary);
  font-weight: 500;
}

.nav-link.active::before {
  opacity: 1;
  background: var(--pure-white);
  transform: translateY(-50%) scale(1.5);
}

.nav-text {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  line-height: 1;
  pointer-events: none;
  /* Prevent text from interfering with clicks */
}

/* Enhanced focus states for accessibility */
.nav-link:focus {
  outline: var(--border-width-thick) solid var(--color-primary);
  outline-offset: var(--border-width-thick);
  border-radius: var(--border-radius-sm);
  /* 2px */
}

.nav-link:focus::before {
  opacity: 0.8;
  background: var(--pure-white);
  transform: translateY(-50%) scale(1.3);
}

.nav-link:focus:not(:focus-visible) {
  outline: none;
}

.nav-link:focus-visible {
  outline: var(--border-width-thick) solid var(--color-primary);
  outline-offset: var(--border-width-thick);
  border-radius: var(--border-radius-sm);
  /* 2px */
}

.nav-link:focus-visible::before {
  opacity: 0.8;
  background: var(--pure-white);
  transform: translateY(-50%) scale(1.3);
}

/* Button Components */
.cta-button {
  display: inline-block;
  padding: var(--space-3) var(--space-8);
  /* 12px 32px */
  border: 1px solid transparent;
  background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box, var(--border-gradient) border-box;
  color: var(--color-text-primary);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px hsl(var(--pure-black-hsl), 0.3);
}

.cta-button:hover {
  background: var(--gradient-orange-green-hover);
  color: var(--color-text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px hsl(var(--pure-black-hsl), 0.4);
  border: 1px solid transparent;
}

.resume-button {
  display: inline-block;
  padding: 16px 40px;
  border: 1px solid transparent;
  background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box, var(--border-gradient) border-box;
  color: var(--color-text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 6px;
  box-shadow: 0 4px 12px hsl(var(--pure-black-hsl), 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resume-button:hover {
  background: var(--gradient-orange-green-hover);
  color: var(--color-text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px hsl(var(--pure-black-hsl), 0.4);
  border: 1px solid transparent;
}

/* Page-level hover effects */
body {
  transition: all 0.3s ease;
}

body:hover {
  background: var(--color-background-secondary);
}

body:hover .category-block,
body:hover .project-block {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(217, 221, 220, 0.9);
}

body:hover .category-block:hover,
body:hover .project-block:hover {
  transform: translateY(-7px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(217, 221, 220, 1);
}

/* Category Block Components */
.category-block {
  background: var(--color-surface);
  padding: 3rem 2rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 12px;
  border: 1px solid rgba(217, 221, 220, 0.7);
  transition: border-width 0.3s ease, border-color 0.3s ease;
}

.category-block:hover {
  border: 2px solid rgba(217, 221, 220, 0.7);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px hsl(var(--pure-black-hsl), 0.2);
  color: inherit;
  text-decoration: none;
}

.category-block:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px hsl(var(--amber-accent-hsl), 0.3);
}

.category-block:focus {
  outline: 2px solid rgba(217, 221, 220, 0.7);
  outline-offset: var(--border-width-thick);
  border: 2px solid rgba(217, 221, 220, 0.7);
}

.category-block:focus:not(:focus-visible) {
  outline: none;
}

.category-block:focus-visible {
  outline: 2px solid rgba(217, 221, 220, 0.7);
  outline-offset: var(--border-width-thick);
}

.category-block:hover .category-icon {
  transform: scale(1.1);
}

.category-icon {
  margin-bottom: 1.5rem;
  color: var(--color-gray-light);
  transition: all 0.3s ease;
  pointer-events: none;
}

.category-block:hover .category-icon {
  color: var(--color-white);
}

.category-block h3 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
  pointer-events: none;
  transition: color 0.3s ease;
}

.category-block p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  max-width: 200px;
  pointer-events: none;
  transition: color 0.3s ease;
}

/* Project Block Components */
.project-block {
  background: var(--color-surface);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(217, 221, 220, 0.7);
  transition: border-width 0.3s ease, border-color 0.3s ease;
}

.project-block:hover {
  border: 2px solid rgba(217, 221, 220, 0.7);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px hsl(var(--pure-black-hsl), 0.2);
}

.project-image {
  width: 100%;
  height: 280px;
  background: var(--background-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-light);
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.project-block:hover .project-image img {
  transform: scale(1.05);
}

.project-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: hsl(var(--color-pure-white-hsl), 0.05);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-block:hover .project-image::before {
  opacity: 1;
}

.project-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-category {
  font-size: 0.85rem;
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
}

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

/* Project Actions Container */
.project-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Live Project Link Styling */
.live-link {
  background: transparent;
  border: 1px solid var(--color-gray-light);
  color: var(--color-gray-light);
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}

.live-link:hover {
  background: var(--color-gray-light);
  color: var(--color-black);
  transform: translateY(-2px);
}

/* Live Project Button for Detail Pages */
.project-links {
  margin-top: 2rem;
}

.live-project-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box, var(--border-gradient) border-box;
  color: var(--color-text-primary);
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px hsl(var(--pure-black-hsl), 0.3);
}

.live-project-btn:hover {
  background: var(--gradient-orange-green-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px hsl(var(--pure-black-hsl), 0.4);
  color: var(--color-text-primary);
  border: 1px solid transparent;
}

.project-block:hover .cta-button {
  transform: translateY(-2px);
}

/* Mixed Layout System for Project Grids */
.projects-grid.mixed-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: stretch;
}

/* Full-width project layout */
.project-block.full-width {
  grid-column: 1 / -1;
  margin: 2rem 0;
}

.project-block.full-width .projects-grid-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  overflow: hidden;
}

.project-block.full-width .project-image {
  height: 300px;
  background: var(--gradient-subtle);
  position: relative;
  z-index: var(--z-base);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.project-block.full-width .project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.project-block.full-width .project-content {
  padding: 3rem;
  position: relative;
  z-index: var(--z-base);
  background: var(--background-subtle);
}

.project-block.full-width .project-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.project-block.full-width .project-description {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* Featured project styling */
.project-block.featured {
  background: var(--color-surface);
  box-shadow: 0 4px 16px hsl(var(--pure-black-hsl), 0.8);
}

.project-block.featured:hover {
  border: 1px solid transparent;
  background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box, var(--border-gradient-hover) border-box;
  box-shadow: 0 16px 48px hsl(var(--pure-black-hsl), 0.9);
  transform: translateY(-6px);
}

.project-block.featured .project-image {
  background: var(--background-subtle);
}

/* Open Source styling for side projects */
.project-block.open-source {
  background: var(--color-surface);
}

.project-block.open-source:hover {
  border: 1px solid transparent;
  background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box, var(--border-gradient-hover) border-box;
}

.project-block.open-source .project-category {
  color: var(--color-text-primary);
}

.project-block.open-source .cta-button {
  border: 1px solid transparent;
  background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box, var(--border-gradient) border-box;
}

.project-block.open-source .cta-button:hover {
  background: var(--gradient-orange-green-hover);
  color: var(--color-text-primary);
  border: 1px solid transparent;
}

.project-block.open-source.featured {
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px hsl(var(--amber-accent-hsl), 0.2);
}

.project-block.open-source.featured:hover {
  box-shadow: 0 16px 48px hsl(var(--amber-accent-hsl), 0.3);
}

/* Coming Soon styling */
.project-block.coming-soon {
  opacity: 0.7;
  pointer-events: none;
}

.project-block.coming-soon .cta-button {
  background: var(--color-gray-medium);
  border-color: var(--color-gray-medium);
  cursor: not-allowed;
}

/* Page Layout Components */
.back-link {
  display: inline-block;
  margin: 2rem 0;
  color: var(--color-text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box, var(--border-gradient) border-box;
}

.back-link:hover {
  color: var(--color-text-primary);
  background: var(--gradient-orange-green-hover);
  transform: translateY(-2px);
  border: 1px solid transparent;
}

/* Section Headers */
.section-header {
  padding: 60px 0 40px;
  text-align: center;
  border-bottom: 1px solid transparent;
  border-image: var(--border-gradient) 1;
}

.section-title {
  font-size: 3.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.section-intro {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* Project Grid Layout */
.projects-section {
  padding: 80px 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

/* ===== CUSTOM MINIMAL CURSOR ===== */


/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-primary);
  color: var(--rich-black);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  z-index: var(--z-cursor);
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 6px;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
  margin-bottom: 1rem;
}

.breadcrumb {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: '→';
  margin-left: 0.5rem;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--color-text-primary);
}

.breadcrumb li[aria-current="page"] {
  color: var(--color-text-primary);
  font-weight: 500;
}

/* ===== EXISTING COMPONENTS ===== */

/* Stick Footer to Bottom */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  flex: 1;
}

/* Footer Styles */
.site-footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
  margin-top: 4rem;
}

.built-by {
  font-size: 0.9rem;
  color: var(--color-pure-white);
  margin-bottom: 0.5rem;
}

.copyright {
  font-size: 0.8rem;
  color: var(--color-pure-white);
  opacity: 1;
  /* Ensure full opacity */
}