/* =============================================
   Portfolio - Main Stylesheet
   ============================================= */

/* =============================================
   CSS Variables for Theming
   ============================================= */
:root {
  /* Dark theme as default */
  --bg-primary: #1a1a1a;
  --bg-secondary: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border-color: #3a3a3a;
  --shadow: rgba(0, 0, 0, 0.3);
  
  /* Brand colors */
  --color-primary: #ff7878;
  --color-primary-dark: #ff6060;
  --color-background-dark: #0f0f0f;
  --color-text-light: #ffffff;
}

/* =============================================
   Reset / Base Styles
   ============================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* =============================================
   Typography
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: 3.5rem;
  font-weight: 800;
}

h2 {
  font-size: 2.75rem;
  font-weight: 700;
}

h3 {
  font-size: 2rem;
  font-weight: 600;
}

h4 {
  font-size: 1.5rem;
  font-weight: 600;
}

h5 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* =============================================
   Layout / Container
   ============================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.block {
  position: relative;
  width: 100%;
}

/* =============================================
   Header / Navigation
   ============================================= */
.block-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  height: 80px;
  padding: 0;
  transition: all 0.3s ease;
}

.block-header--scrolled {
  background-color: var(--bg-secondary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.block-header-layout-desktop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.block-header-logo {
  display: flex;
  align-items: center;
  height: 50px;
}

.block-header-logo__image {
  height: 100%;
  width: auto;
  filter: brightness(0) invert(1);
}

.block-header__nav {
  display: flex;
}

.block-header__nav-links {
  display: flex;
  list-style: none;
  gap: 40px;
  align-items: center;
}

.item-content {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 400;
  transition: opacity 0.3s ease;
  padding: 8px 0;
  position: relative;
}

.item-content:hover {
  opacity: 0.8;
}

.item-content-wrapper--active .item-content::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-primary);
}

/* Mobile Navigation */
.block-header-layout-mobile {
  display: none;
}

@media (max-width: 768px) {
  .block-header-layout-desktop {
    display: none;
  }
  
  .block-header-layout-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
  }
  
  .burger {
    width: 30px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
  }
  
  .burger__bun,
  .burger__meat {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: transform 0.3s ease;
  }
  
  .block-header-layout-mobile__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  .block-header--scrolled .block-header-layout-mobile__dropdown {
    background-color: var(--bg-secondary);
  }
  
  .block-header-layout-mobile__dropdown--open {
    max-height: 400px;
    border-top: 1px solid var(--border-color);
  }
  
  .block-header-layout-mobile__dropdown .block-header__nav-links {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 20px;
  }
}

/* =============================================
   Hero Section
   ============================================= */
.block--desktop-first-visible {
  padding-top: 80px;
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.block-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.block-background--fixed {
  position: fixed;
  top: 0;
  z-index: -1;
}

.block-background__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.block-background__image--fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  object-fit: cover;
}

.block-background__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
}

.block-background__overlay--fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
}

.block-layout-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  z-index: 1;
}

.hero-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 30px;
  padding: 60px 20px;
}

.hero-title h2 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0;
  letter-spacing: -1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  max-width: 700px;
  margin: 0 auto;
}

.hero-subtitle p {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-primary);
  opacity: 0.9;
  line-height: 1.8;
  margin: 0;
}

.hero-button {
  margin-top: 20px;
}

/* =============================================
   Buttons
   ============================================= */
.grid-button {
  display: inline-block;
  padding: 14px 35px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 30px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.grid-button--primary {
  background-color: var(--color-primary);
  color: var(--color-text-light);
}

.grid-button--primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 120, 120, 0.3);
}

.grid-button--secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.grid-button--secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 120, 120, 0.3);
}

/* =============================================
   Topics Section
   ============================================= */
.section {
  padding: 80px 0;
  background-color: var(--bg-primary);
}

.block-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 2.75rem;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 0;
}

/* Topic Items */
.topic-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
  grid-column: 1 / -1;
}

.topic-container:last-child {
  margin-bottom: 0;
}

/* Alternate layout without using RTL */
.topic-container:nth-child(even) .topic-image {
  grid-column: 2;
}

.topic-container:nth-child(even) .topic-content {
  grid-column: 1;
  grid-row: 1;
}

.topic-image {
  width: 100%;
}

.image--grid {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image--grid:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.image__image {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.topic-content {
  padding: 0 20px;
}

.topic-content h5 {
  font-size: 1.75rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.topic-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .topic-container {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 50px;
  }
  
  .topic-container:nth-child(even) .topic-image,
  .topic-container:nth-child(even) .topic-content {
    grid-column: 1;
    grid-row: auto;
  }
  
  .image__image {
    height: 250px;
  }
  
  .topic-content {
    padding: 0;
  }
}

/* =============================================
   Support CTA Section
   ============================================= */
.support-cta {
  position: relative;
  padding: 100px 0;
  background-color: var(--bg-secondary);
}

.support-cta .block-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.support-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 30px;
  position: relative;
  z-index: 1;
}

.support-layout h3 {
  font-size: 2.25rem;
  color: var(--text-primary);
  max-width: 800px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* =============================================
   Footer
   ============================================= */
.footer {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 60px 0 40px;
  border-top: 1px solid var(--border-color);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.footer-top {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-top h4 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0;
}

.footer-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 30px;
}

.footer-logo-img {
  height: 60px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.social-icons__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-icons__link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.social-icons__link svg {
  width: 22px;
  height: 22px;
  fill: var(--text-primary);
}

@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    gap: 20px;
  }
  
  .footer-top h4 {
    font-size: 1.25rem;
  }
  
  .footer-logo {
    padding: 0;
  }
  
  .footer-logo-img {
    height: 50px;
  }
}

/* =============================================
   Forms
   ============================================= */
.form {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.form__control {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.input {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input__label {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 500;
}

.input__component {
  width: 100%;
  padding: 15px 20px;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.input__component::placeholder {
  color: var(--text-secondary);
}

.input__component:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: var(--bg-secondary);
}

.input__component--textarea {
  min-height: 150px;
  resize: vertical;
}

/* Contact Form */
.contact-form {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 50px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

/* =============================================
   Page Specific Styles
   ============================================= */
.about-hero-layout,
.support-hero-layout,
.contact-layout {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
  gap: 30px;
}

/* Mission/Vision */
.mission-vision-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 60px 0;
  max-width: 1000px;
  margin: 0 auto;
}

.mission-box,
.vision-box {
  padding: 40px;
  background-color: var(--bg-secondary);
  border-radius: 20px;
}

.mission-box h3,
.vision-box h3 {
  margin-bottom: 20px;
  color: var(--text-primary);
}

.vision-list {
  list-style: none;
  padding: 0;
}

.vision-list li {
  margin-bottom: 15px;
  padding-left: 25px;
  position: relative;
  color: var(--text-secondary);
}

.vision-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

/* Philosophy */
.philosophy-section {
  position: relative;
  padding: 100px 0;
  min-height: 100vh;
}

.philosophy-container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin: 60px 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.philosophy-item {
  padding: 40px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.philosophy-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.philosophy-item h4 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.philosophy-item p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.1rem;
}

.philosophy-closing {
  margin-top: 60px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.philosophy-closing p {
  font-size: 1.25rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* =============================================
   Utilities
   ============================================= */
.text-center {
  text-align: center;
}

.text-white {
  color: #ffffff !important;
}

.text-white h1,
.text-white h2,
.text-white h3,
.text-white h4,
.text-white h5,
.text-white p {
  color: #ffffff !important;
}

/* =============================================
   Component Specific Classes
   ============================================= */
.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-primary);
}

.section-spacing {
  margin-top: 1rem;
}

.section-spacing-lg {
  margin-top: 2rem;
}

.section-spacing-xl {
  margin-top: 3rem;
}

.skill-heading {
  margin-bottom: 10px;
  color: var(--text-primary);
}

.skill-heading-spaced {
  margin: 20px 0 10px;
  color: var(--text-primary);
}

.filter-container {
  margin-bottom: 30px;
  text-align: center;
}

.filter-button {
  margin: 0 5px;
  padding: 8px 16px;
  border: 2px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  color: var(--text-primary);
}

.filter-button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-button--active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-light);
}

.project-image {
  margin-bottom: 20px;
}

.project-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 8px var(--shadow);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 15px;
}

.project-header h4 {
  margin: 0;
}

.project-description {
  margin-bottom: 20px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.tech-stack {
  margin-bottom: 20px;
}

.tech-badge {
  display: inline-block;
  background: var(--bg-secondary);
  padding: 4px 10px;
  margin: 2px;
  border-radius: 15px;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.featured-badge {
  background: var(--color-primary);
  color: var(--color-text-light);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.project-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.project-stats span {
  display: flex;
  align-items: center;
}

.project-links {
  display: flex;
  gap: 10px;
}

.project-links a {
  flex: 1;
  text-align: center;
}


.loading-message {
  text-align: center;
  padding: 40px;
}

.loading-text {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.error-message {
  text-align: center;
  padding: 40px;
}

.error-text {
  font-size: 1.2rem;
  color: var(--color-primary);
}

.error-details {
  color: var(--text-secondary);
  margin-top: 10px;
}

.philosophy-text {
  font-size: 1.25rem;
  margin-top: 1rem;
  color: var(--text-primary);
}

/* =============================================
   Project Card Animations
   ============================================= */
.project-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 107, 107, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card .project-image img {
  transition: transform 0.3s ease;
}

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

.project-card .grid-button {
  transition: all 0.3s ease;
}

.project-card:hover .grid-button--secondary {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  transform: translateY(-2px);
}

.project-card:hover .grid-button--primary {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.project-card .tech-badge {
  transition: all 0.3s ease;
}

.project-card:hover .tech-badge {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  transform: scale(1.05);
}

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

.transition--slide {
  animation: fadeIn 0.6s ease-out;
}

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 1200px) {
  .container {
    max-width: 960px;
  }
}

@media (max-width: 992px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  .hero-title h2 {
    font-size: 2.5rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }
  
  .hero-layout {
    padding: 40px 20px;
  }
  
  .hero-title h2 {
    font-size: 2rem;
  }
  
  .hero-subtitle p {
    font-size: 1.1rem;
  }
  
  .mission-vision-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .philosophy-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-form {
    padding: 30px;
  }
}

@media (max-width: 480px) {
  .hero-title h2 {
    font-size: 1.75rem;
  }
  
  .section-title h2 {
    font-size: 1.75rem;
  }
  
  .grid-button {
    padding: 12px 30px;
    font-size: 14px;
  }
}

/* =============================================
   Footer
   ============================================= */
.footer {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 60px 0 40px;
  border-top: 1px solid var(--border-color);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section {
  text-align: left;
}

.footer-title {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.footer-subtitle {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 15px;
}

.footer-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.footer-link:hover {
  color: var(--color-primary);
}

.footer-social {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.social-icons__link {
  color: var(--text-secondary);
  width: 24px;
  height: 24px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons__link:hover {
  color: var(--color-primary);
  transform: translateY(-2px);
}

.social-icons__link svg {
  width: 100%;
  height: 100%;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  text-align: center;
}

.footer-copyright {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

@media (max-width: 768px) {
  .footer {
    padding: 40px 0 30px;
    margin-top: 60px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  
  .footer-section {
    text-align: center;
  }
  
  .footer-nav {
    align-items: center;
  }
  
  .footer-social {
    justify-content: center;
  }
}