/* Custom CSS for responsive portfolio website */

/* Base styles */
:root {
  --primary-color: #0e141b;
  --secondary-color: #4e6e97;
  --accent-color: #e7ecf3;
  --background-color: #f8fafc;
  --border-color: #e7ecf3;
  --card-bg: #ffffff;
  --text-muted: #6b7280;
  --hover-bg: #f3f4f6;
}

/* Dark mode variables */
[data-theme="dark"] {
  --primary-color: #f8fafc;
  --secondary-color: #9ca3af;
  --accent-color: #374151;
  --background-color: #111827;
  --border-color: #374151;
  --card-bg: #1f2937;
  --text-muted: #9ca3af;
  --hover-bg: #374151;
}

body {
  font-family: "Space Grotesk", "Noto Sans", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: var(--background-color);
  color: var(--primary-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

*, *::before, *::after {
  box-sizing: inherit;
}

/* Header responsive styles */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
  background-color: var(--background-color);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--primary-color);
}

.navigation {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

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

.nav-link {
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--secondary-color);
}

.nav-link.active {
  color: var(--secondary-color);
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--secondary-color);
  border-radius: 1px;
}

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--accent-color);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-left: 0.5rem;
}

.theme-toggle:hover {
  background-color: var(--hover-bg);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

#sun-icon {
  display: none;
}

#moon-icon {
  display: block;
}

.social-buttons {
  display: flex;
  gap: 0.5rem;
}

.social-btn {
  display: flex;
  max-width: 480px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0.5rem;
  height: 2.5rem;
  background-color: var(--accent-color);
  color: var(--primary-color);
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  border: none;
  padding: 0 0.625rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.social-btn:hover {
  background-color: #d1d9e6;
  transform: translateY(-1px);
}

.social-btn svg {
  width: 20px !important;
  height: 20px !important;
  fill: currentColor;
}

/* Main content responsive styles */
.main-container {
  padding: 0 10rem;
  display: flex;
  flex: 1;
  justify-content: center;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  background-color: var(--background-color);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 960px;
  flex: 1;
}

/* Profile section */
.profile-section {
  display: flex;
  padding: 1rem;
}

.profile-container {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.profile-info {
  display: flex;
  gap: 1rem;
  flex-direction: column;
  align-items: center;
}

.profile-image {
  background-image: url("./../images/profile.png");
  background-position: center;
  background-repeat: no-repeat;
  aspect-ratio: 1;
  background-size: cover;
  border-radius: 50%;
  min-height: 8rem;
  width: 8rem;
}

.profile-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.profile-name {
  color: var(--primary-color);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-align: center;
  margin: 0;
}

.profile-title {
  color: var(--secondary-color);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  margin: 0;
}

.profile-description {
  padding: 2rem 0.5rem;
  color: var(--secondary-color);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  margin: 0;
  max-width: 600px;
}

/* Projects section */

.projects-section {
  padding: 4rem 1rem;
}

.projects-title {
  color: var(--primary-color);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-align: center;
  margin: 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 0.5rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .project-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.project-image {
  width: 100%;
  background-position: center;
  background-repeat: no-repeat;
  aspect-ratio: 16/9;
  background-size: cover;
  border-radius: 0.5rem;
}

.project-smart-home {
  background-image: url("../images/smart-home.jpg");
}

.project-license-plate {
  background-image: url("../images/license-plate-recognition.jpg");
}

.project-robotics {
  background-image: url("../images/robotics.jpg");
}

.project-info h3 {
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
}

.project-info p {
  color: var(--secondary-color);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
}

/* Contact section */
.contact-section {
  padding: 4rem 1rem;
  text-align: center;
}

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

.contact-title {
  color: var(--primary-color);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-align: center;
  margin: 0;
}

.contact-description {
  color: var(--secondary-color);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  margin: 0;
  max-width: 600px;
}

/* Footer styles */
.footer {
  display: flex;
  justify-content: center;
  background-color: var(--background-color);
  /* border-top: 1px solid var(--border-color); */
  /* margin-top: 3rem; */
}

.footer-container {
  display: flex;
  max-width: 960px;
  flex: 1;
  flex-direction: column;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 2rem 2.5rem;
  text-align: left;
}

.footer-info {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 1rem;
}

.footer-title {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.footer-description {
  color: var(--secondary-color);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.footer-subtitle {
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.footer-contact,
.footer-links,
.footer-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.contact-icons,
.quick-link-icons,
.social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.contact-icons a,
.quick-link-icons a,
.social-icons a {
  color: var(--secondary-color);
  transition: color 0.3s ease, transform 0.2s ease, background-color 0.3s ease;
  padding: 0.75rem;
  border-radius: 50%;
  background-color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  text-decoration: none;
}

.contact-icons a:hover,
.quick-link-icons a:hover,
.social-icons a:hover {
  color: var(--primary-color);
  transform: scale(1.1);
  background-color: var(--hover-bg);
}

/* Ensure all SVGs are the same size */
.contact-icons a svg,
.quick-link-icons a svg,
.social-icons a svg {
  width: 24px !important;
  height: 24px !important;
  fill: currentColor;
  flex-shrink: 0;
}

.footer-bottom {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.footer-copyright {
  color: var(--secondary-color);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 0.5rem 0;
}

.footer-note {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0;
}

/* Responsive Design */

/* Large tablets and small laptops */
@media (max-width: 1024px) {
  .main-container {
    padding: 0 4rem 1.25rem;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

/* Tablets */
@media (max-width: 768px) {
  .header {
    padding: 0.75rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
  }
  
  .navigation {
    width: 100%;
    justify-content: space-between;
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-links {
    gap: 1.5rem;
  }
  
  .main-container {
    padding: 0 2rem 1.25rem;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .profile-image {
    min-height: 6rem;
    width: 6rem;
  }
  
  .profile-name {
    font-size: 1.25rem;
  }
  
  .projects-title {
    font-size: 1.25rem;
  }
  
  .contact-title {
    font-size: 1.75rem;
  }
  
  .contact-description {
    font-size: 1rem;
  }
  
  .footer-content {
    padding: 1.5rem 1.5rem;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-info {
    text-align: center;
  }
}

/* Mobile phones */
@media (max-width: 480px) {
  .header {
    padding: 0.75rem 1rem;
  }
  
  .logo-section {
    gap: 0.5rem;
  }
  
  .logo-section h2 {
    font-size: 1rem;
  }
  
  .nav-links {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .nav-link {
    font-size: 0.8rem;
  }
  
  .social-buttons {
    gap: 0.25rem;
  }
  
  .social-btn {
    height: 2.25rem;
    padding: 0 0.5rem;
    font-size: 0.8rem;
  }
  
  .theme-toggle {
    width: 2.25rem;
    height: 2.25rem;
    margin-left: 0.25rem;
  }
  
  .theme-toggle svg {
    width: 1rem;
    height: 1rem;
  }
  
  .main-container {
    padding: 0 1rem 1.25rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .profile-image {
    min-height: 5rem;
    width: 5rem;
  }
  
  .profile-name {
    font-size: 1.125rem;
  }
  
  .profile-title,
  .profile-description {
    font-size: 0.875rem;
  }
  
  .projects-title {
    font-size: 1.125rem;
    padding: 1rem 1rem 0.5rem;
  }
  
  .contact-section {
    padding: 2rem 1rem;
  }
  
  .contact-title {
    font-size: 1.5rem;
  }
  
  .contact-description {
    font-size: 0.9rem;
  }
  
  .footer-content {
    padding: 1.5rem 1rem;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .contact-icons,
  .quick-link-icons,
  .social-icons {
    gap: 0.75rem;
  }
  
  .contact-icons a,
  .quick-link-icons a,
  .social-icons a {
    width: 44px;
    height: 44px;
    padding: 0.625rem;
  }
  
  .contact-icons a svg,
  .quick-link-icons a svg,
  .social-icons a svg {
    width: 20px !important;
    height: 20px !important;
  }
  
  .footer-copyright {
    font-size: 0.875rem;
  }
}

/* Extra small phones */
@media (max-width: 320px) {
  .header {
    padding: 0.5rem;
  }
  
  .main-container {
    padding: 0 0.5rem 1rem;
  }
  
  .profile-section,
  .projects-grid {
    padding: 0.5rem;
  }
  
  .projects-title {
    padding: 0.75rem 0.5rem 0.5rem;
    font-size: 1rem;
  }
  
  .footer-content {
    padding: 1rem 0.5rem;
  }
}

/* Smooth transitions for responsive changes */
* {
  transition: all 0.3s ease;
}

/* Focus states for accessibility */
.nav-link:focus,
.social-btn:focus,
.footer-link:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .social-buttons,
  .footer-social {
    display: none;
  }
  
  .header {
    border-bottom: 2px solid #000;
  }
  
  .main-container {
    padding: 1rem;
  }
}