/* 
* styles.css - Consolidated CSS file for Josef's Portfolio
* All styles are now in this single file for better maintenance
*/

/* Font imports */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&display=swap');

/* Variables */
:root {
  --dark-color-primary: #0b1424;
  --mid-color-primary: #25375c;
  --light-color-primary: #d7e0ea;
  --active-button: #af7479;
  --visited-link: #b89db8;
  --font-primary: "Silkscreen", sans-serif;
  --font-body: "JetBrains Mono", monospace;
  --header-height: 70px;
}

/* Global body font update */
body {
  font-family: var(--font-body);
  color: var(--light-color-primary);
  background-color: var(--dark-color-primary);
  margin: 0;
  padding: 0;
  font-size: 16px; /* Slightly smaller for better readability with monospace */
  font-weight: 400;
}

* {
  box-sizing: border-box;
}

/* Heading styles - ALL BOLD NOW */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700; /* Bold for ALL headings */
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

h1 {
  font-size: 2.5rem;
  color: var(--light-color-primary);
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

/* Text elements */
p, li, input, textarea, .status-badge {
  font-family: var(--font-body);
  line-height: 1.6;
  margin-bottom: 1em;
}

/* UI elements - ALL BOLD NOW */
button, .button, .skill-bubble, .nav-item, a {
  font-family: var(--font-primary);
  font-weight: 700; /* Bold for UI elements */
}

/* Force consistent styling for Silkscreen elements */
.font-primary,
[class*="heading"],
.nav-item,
.button,
.skill-bubble,
.section-title,
.card-title {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
}

/* Reduce spacing between sections */
.section {
  min-height: 60vh; /* Reduced from 70vh */
  padding: 2rem 0; /* Reduced from 3rem */
  display: flex;
  align-items: center;
}

/* Specific adjustment for projects section */
#projects {
  padding-top: 4rem; /* Reduced from original padding */
  margin-top: -2rem; /* Negative margin to pull it up */
}

/* Fix MY WORK heading */
#projects h2 {
  margin-bottom: 1.5rem; /* Reduced from 2rem or more */
}

/* Header alignment fix */
header {
  height: var(--header-height);
}

header nav {
  height: 70px; /* Fixed height for header */
  display: flex;
  align-items: center;
  position: relative; /* Required for absolute positioning of mobile menu button */
  padding: 0 1rem;
}

header .nav-logo {
  display: flex;
  align-items: center;
  height: 100%;
}

header .nav-logo span, 
header .nav-logo img {
  max-height: 50px; /* Consistent height for logo elements */
}

header .nav-links {
  height: 100%;
  display: flex;
  align-items: center;
}

header .nav-links ul {
  height: 100%;
  display: flex;
  align-items: center;
}

header .nav-links li {
  display: flex;
  align-items: center;
  height: 100%;
  margin-bottom: 0;
}

header .nav-links a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 10px;
}

/* Menu button position fix */
#mobile-menu-button {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
}

/* Custom mobile menu styles */
#mobile-menu {
  /* Must be initially hidden */
  display: none !important;
  background-color: #25375c !important; /* Force the mid color */
  z-index: 40;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
}

/* Force consistent background color on all pages */
#mobile-menu div {
  background-color: #25375c !important;
}

/* Reset any Alpine.js related styles */
[x-cloak], 
[x-show], 
[x-data] {
  display: initial;
}

/* Ensure mobile menu toggle works correctly */
#mobile-menu.active,
#mobile-menu.menu-show {
  display: block !important;
}

/* Force correct display of hamburger/close icons */
#hamburger-icon.hidden,
#close-icon.hidden,
#hamburger-icon.icon-hide,
#close-icon.icon-hide {
  display: none !important;
}

#hamburger-icon:not(.hidden),
#close-icon:not(.hidden),
#hamburger-icon.icon-show,
#close-icon.icon-show {
  display: block !important;
}

/* Make mobile menu links consistent across all pages */
#mobile-menu a.mobile-link {
  display: block !important;
  padding: 0.75rem 1rem !important;
  margin: 0.25rem 0.75rem !important;
  color: #d7e0ea !important; /* --light-color-primary */
  border-radius: 0.5rem !important;
  transition: all 0.2s ease !important;
}

/* Fix hover effects to be consistent */
#mobile-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #d7e0ea !important; /* --light-color-primary */
  transform: translateX(5px);
}

/* Mobile navigation fixes to make hidden actually work */
@media (max-width: 900px) {
  /* Force hidden style for mobile navigation to take precedence */
  .hidden.md\:flex {
    display: none !important;
  }
  
  /* Force mobile button to display */
  .md\:hidden {
    display: block !important;
  }
  
  /* Make menu work properly on mobile */
  header div[x-show="mobileMnuOpen"] {
    display: none;
  }
  
  header div[x-show="mobileMnuOpen"][style*="display: block"] {
    display: block !important;
    max-height: 85vh;
    overflow-y: auto;
  }
  
  /* Fix for Alpine.js elements showing on page load */
  [x-cloak] {
    display: none !important;
  }
  
  /* Improved spacing for menu items */
  header div[x-show="mobileMnuOpen"] a {
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
  }
  
  /* Adjust logo size on smaller screens */
  header .nav-logo span {
    font-size: 1.25rem !important;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  body {
    font-size: 15px;
  }
  
  /* Better button sizing on mobile */
  .btn-primary, .btn-outline {
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
  }
}

/* Mobile Hero Section Structure - Reversed */
@media (max-width: 767px) {
  #home .flex.flex-col.md\:flex-row {
    flex-direction: column-reverse !important;
  }
  
  #home img.rounded-full {
    margin: 0 auto 2rem auto;
    max-width: 80% !important;
    border-width: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  }
  
  #home h1, #home p, #home .flex.space-x-6, #home a.btn-primary {
    text-align: center;
  }
  
  #home .flex.space-x-6 {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }
  
  #home a.btn-primary {
    margin: 0 auto;
    display: block;
    max-width: 250px;
    padding: 0.75rem 1rem;
  }
  
  /* Better spacing for social icons on mobile */
  #home .space-x-6 {
    gap: 1.5rem;
    margin-bottom: 1rem;
  }
  
  /* Hero section adjustments for mobile */
  #home .container > div {
    gap: 1rem;
  }
  
  /* Project cards for mobile */
  .project-row {
    margin-bottom: 3.5rem;
  }
  
  .project-row .project-image {
    margin-bottom: 2rem;
  }
  
  .project-row .project-details h3 {
    text-align: center;
  }
  
  .project-card h3 {
    font-size: 1.25rem;
  }
}

/* Project rows layout for all screen sizes */
.project-row {
  margin-bottom: 4rem;
}

.project-image img {
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.project-image img:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

/* Desktop and large tablet project layout */
@media (min-width: 1024px) {
  .project-row {
    display: flex;
    gap: 3rem;
    align-items: center;
    margin-bottom: 6rem;
  }
  
  .project-image {
    flex: 1;
    max-width: 50%;
  }
  
  .project-details {
    flex: 1;
    padding: 1rem;
  }
  
  /* Fix the even-numbered project rows */
  .project-row:nth-child(even) {
    flex-direction: row-reverse;
  }
  
  /* Consistent image sizes on desktop */
  .project-image img.widescreen {
    width: 100%;
    max-width: 100%;
  }
  
  .project-image img.phone,
  .project-image img.armadillo-app {
    max-width: 60%;
    margin: 0 auto;
    display: block;
  }
  
  /* Iframe fixes for desktop */
  .project-image .relative iframe {
    width: 100%;
    height: 400px;
  }
}

/* Tablet project layout - more compact with better spacing */
@media (min-width: 768px) and (max-width: 1023px) {
  .project-row {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 5rem;
  }
  
  .project-image {
    flex: 1;
  }
  
  .project-details {
    flex: 1;
    padding: 1rem;
  }
  
  /* Fix the even-numbered project rows */
  .project-row:nth-child(even) {
    flex-direction: row-reverse;
  }
  
  /* Consistent image sizes on tablet */
  .project-image img.widescreen {
    max-width: 100%;
  }
  
  .project-image img.phone,
  .project-image img.armadillo-app {
    max-width: 60%;
    margin: 0 auto;
    display: block;
  }
}

/* Mobile project layout - stacked with better spacing */
@media (max-width: 767px) {
  .project-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 3.5rem;
  }
  
  .project-image {
    margin-bottom: 2rem;
  }
  
  .project-details h3 {
    text-align: center;
    margin-bottom: 1rem;
  }
  
  /* Improved image displays on mobile */
  .project-image img.widescreen {
    width: 100%;
    border-radius: 0.75rem;
  }
  
  .project-image img.phone,
  .project-image img.armadillo-app {
    max-width: 70%;
    margin: 0 auto;
    display: block;
    border-radius: 1.5rem;
  }
  
  /* Skills list on mobile */
  .skills-list {
    justify-content: center;
    margin-bottom: 1.5rem;
  }
  
  /* Better buttons display on mobile */
  .project-details .flex.flex-wrap.gap-2 {
    justify-content: center;
    gap: 0.5rem !important;
  }
  
  .btn-mini {
    margin-bottom: 0.5rem;
  }
}

/* Very small screens */
@media (max-width: 479px) {
  .project-image img.phone,
  .project-image img.armadillo-app {
    max-width: 85%;
  }
  
  .project-details h3 {
    font-size: 1.5rem;
  }
  
  .skills-list li {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
  
  .btn-mini {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
}

/* Fix for very small screens */
@media (max-width: 350px) {
  .nav-logo span {
    font-size: 1rem !important;
  }
  
  h1 {
    font-size: 1.5rem !important; 
  }
  
  h2 {
    font-size: 1.35rem !important;
  }
  
  h3 {
    font-size: 1.2rem !important;
  }
  
  p {
    font-size: 0.9rem !important;
  }
  
  .btn-primary, .btn-outline {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
  
  .project-image img.phone,
  .project-image img.armadillo-app {
    max-width: 90% !important;
  }
}

/* Compact section for contact */
.section-compact {
  min-height: auto;
  padding: 1.5rem 0;
}

/* Scroll animation */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Project card hover effects */
.project-card {
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

/* Skills list style */
.skills-list {
  list-style-type: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills-list li {
  font-family: var(--font-body);
  background-color: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

/* Button Styles - Consistency */
.btn-primary {
  display: inline-block;
  font-family: var(--font-primary);
  font-weight: 700;
  background-color: #25375c;
  color: var(--light-color-primary);
  border: 2px solid var(--light-color-primary);
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--light-color-primary);
  color: var(--dark-color-primary);
}

.btn-outline {
  display: inline-block;
  width: 100%;
  font-family: var(--font-primary);
  font-weight: 700;
  background-color: #0b1424;
  color: var(--light-color-primary);
  border: 2px solid var(--light-color-primary);
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-outline:hover {
  background-color: var(--light-color-primary);
  color: var(--dark-color-primary);
}

.btn-mini {
  display: inline-block;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.8rem;
  background-color: #0b1424;
  color: var(--light-color-primary);
  border: 1px solid var(--light-color-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.btn-mini:hover {
  background-color: var(--light-color-primary);
  color: var(--dark-color-primary);
}

.btn-mini-disabled {
  display: inline-block;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.8rem;
  background-color: transparent;
  color: var(--mid-color-primary);
  border: 1px solid var(--mid-color-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: transparent;
  border: 1px solid var(--light-color-primary);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Link styles */
a {
  color: var(--light-color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:visited {
  color: var(--visited-link);
}

a:hover,
a:focus {
  color: var(--active-button);
  text-decoration: none;
}

a:active {
  color: var(--light-color-primary);
}

/* Form styles */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  background-color: var(--mid-color-primary);
  color: var(--light-color-primary);
  border: 2px solid var(--light-color-primary);
  padding: 0.75rem;
  border-radius: 0.5rem;
  width: 100%;
  outline: none;
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  border-color: var(--active-button);
  box-shadow: 0 0 0 3px rgba(175, 116, 121, 0.2);
}

/* Call to Action Section Responsive Styles */
@media (max-width: 767px) {
  section.py-12.md\:py-16 {
    padding: 3rem 1.5rem !important;
  }
  
  section.py-12.md\:py-16 h2 {
    font-size: 1.75rem !important;
    margin-bottom: 1.5rem;
  }
  
  section.py-12.md\:py-16 p {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  section.py-12.md\:py-16 .btn-outline {
    margin-bottom: 1rem;
    padding: 0.75rem 1.25rem;
  }
}

/* Footer Responsive Styles */
@media (max-width: 767px) {
  footer {
    padding: 2rem 1rem;
  }
  
  footer h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  footer .flex.justify-center.gap-5 {
    gap: 2rem !important;
  }
  
  footer img {
    width: 1.75rem;
    height: 1.75rem;
  }
}

/* Iframe Responsive Fixes */
.project-image iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Mobile Menu Animation */
#mobile-menu {
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease, display 0.3s ease;
}

#mobile-menu.menu-show {
  transform: translateY(0);
  opacity: 1;
}

/* Social icons styling */
.social-icon {
  color: var(--light-color-primary);
  transition: color 0.2s ease;
}

.social-icon:hover {
  color: var(--active-button);
}

/* Custom styles for Armatillo app screenshot */
.armadillo-app {
  max-width: 60% !important;
  display: block;
  margin: 0 auto;
  border: none !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

@media (max-width: 767px) {
  .armadillo-app {
    max-width: 70% !important;
  }
}

/* BRUTALLY FORCE MENU HIDDEN - This is the only safe approach at this point */
#mobile-menu {
  display: none !important;
}

/* Create a class that will be used by JS to show the menu when needed */
#mobile-menu.menu-show {
  display: block !important;
}

/* Controls icon visibility */
#hamburger-icon.icon-hide, #close-icon.icon-hide {
  display: none !important;
}

#hamburger-icon.icon-show, #close-icon.icon-show {
  display: block !important;
}
