/* 
   Portfolio Website Stylesheet
   A clean, responsive foundation for your portfolio
*/

/* ===== BASE STYLES ===== */
:root {
  /* Main color palette - customize these to match your brand */
  --primary-color: #4e6e8e;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  
  /* Typography */
  --body-font: 'Open Sans', sans-serif;
  --heading-font: 'Montserrat', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--light-color);
}

/* section:first-of-type {
  margin-top: 70px;
} */

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  margin-bottom: var(--spacing-sm);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  position: relative;
  margin-bottom: var(--spacing-md);
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 50px;
  height: 3px;
  background-color: var(--accent-color);
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: var(--spacing-sm);
}

i {
  font-style: italic;
}

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

a:hover {
  color: white;
}

/* Prettier code style for inline code */
code {
  background: #f4f4f4;
  color: #c7254e;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Fira Mono', 'Consolas', 'Monaco', monospace;
  font-size: 0.97em;
  font-weight: 500;
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

section {
  padding: var(--spacing-xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-title h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.right{
  float: right;
}

/* ===== HEADER & NAVIGATION ===== */
header {
  background-color: var(--dark-color);
  color: var(--light-color);
  padding: var(--spacing-sm) 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
}

.logo a {
  color: var(--light-color);
}

.nav-links {
  list-style: none;
  display: flex;
}

.nav-links li {
  margin-left: var(--spacing-md);
}

.nav-links a {
  color: var(--light-color);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--light-color);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== HERO SECTION ===== */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: right bottom;
  position: relative;
  margin-top: 70px; /* account for fixed header */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  color: var(--light-color);
  max-width: 800px;
}

.hero-subtitle {
  font-size: .8rem;
  font-style: italic;
  margin-top: -15px;
  margin-bottom: var(--spacing-sm);}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: var(--spacing-sm);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-md);
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background-color: var(--accent-color);
  color: var(--light-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.btn:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Hero section flex layout and image flip */
.hero-flex {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  height: 100vh;
  min-height: 420px;
  gap: 36px;
  position: relative;
  z-index: 2;
}
.hero-content {
  flex: 1 1 380px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 3;
}
.hero-photo-wrapper {
  position: absolute;
  top: 0;
  right: -8vw;
  height: 100%;
  width: 56vw;
  min-width: 340px;
  max-width: 900px;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  z-index: 1;
  pointer-events: none;
}
.hero-photo-flip {
  height: 100%;
  width: 100%;
  max-width: 100vw;
  object-fit: cover;
  /* border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  background: #fff;
  border: 3px solid var(--light-color); */
  transform: scaleX(-1);
  display: block;
}
@media (max-width: 1440px) {
  .hero-flex {
    flex-direction: column;
    height: auto;
    gap: 24px;
  }
  .hero-photo-wrapper {
    position: static;
    width: 100vw;
    min-width: 0;
    height: 60vw;
    min-height: 180px;
    justify-content: center;
    z-index: 1;
    pointer-events: none;
    right: 0;
  }
  .hero-photo-flip {
    max-width: 100vw;
    max-height: 60vw;
    width: 100vw;
    height: 100%;
  }
  .hero-content {
    flex: 0 1 52vw;
  }
  .hero .container {
    margin: 0 auto auto auto;
    padding-top: 0;
  }

  section#home {
    padding-top: 0;
  }
}
@media (max-width: 600px) {
  .hero-flex {
    gap: 12px;
  }
  .hero-photo-flip {
    max-width: 100vw;
    border-radius: 10px;
  }
}

/* ===== ABOUT SECTION ===== */
.about {
  background-color: white;
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-md);
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-image {
  flex: 1;
  min-width: 300px;
}

.about-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ===== SKILLS SECTION ===== */
.skills {
  background-color: var(--light-color);
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

.skill-card {
  background-color: white;
  border-radius: 8px;
  padding: var(--spacing-md);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

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

.skill-card h3 {
  margin-bottom: var(--spacing-sm);
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio {
  background-color: white;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.portfolio-item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.portfolio-item:hover {
  transform: translateY(-10px);
}

.portfolio-image {
  height: 200px;
  overflow: hidden;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.05);
}

.portfolio-content {
  padding: var(--spacing-sm);
  background-color: white;
}

.portfolio-content h3 {
  margin-bottom: var(--spacing-xs);
}

.portfolio-content p {
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  background-color: var(--light-color);
  font-size: 0.8rem;
  padding: 0px 10px;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--primary-color);
  font-weight: 500;
  transition: all 0.2s ease;
}

.tag:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.title-with-icon {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: var(--spacing-sm);
}

.app-icon {
    flex-shrink: 0;
}

.app-icon img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.title-with-icon h3 {
    margin-bottom: 0;
}

.app-store-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.app-store-button img {
    height: 45px;
    width: auto;
}

.google-play-button img {
    height: 45px;
    width: auto;
}

/* ===== CONTACT SECTION ===== */
.contact {
  background-color: var(--light-color);
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.contact-info {
  flex: 1;
  min-width: 300px;
}

.contact-info p {
  margin-bottom: var(--spacing-sm);
}

.social-links {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  justify-content: flex-start;
  align-items: center;
  flex-direction: row;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  font-size: 1.25rem;
}

.social-link i {
  color: white; /* Ensure icon is white by default */
  transition: color 0.3s;
}

.social-link:hover,
.social-link:focus {
  background-color: var(--accent-color);
  transform: translateY(-3px);
}

.contact-form {
  flex: 1;
  min-width: 300px;
}

.form-group {
  margin-bottom: var(--spacing-sm);
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

input, textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: var(--body-font);
}

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

/* ===== FOOTER ===== */
footer {
  background-color: var(--dark-color);
  color: var(--light-color);
  padding: var(--spacing-md) 0;
  text-align: center;
}

.footer-tooltip-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.footer-tooltip {
  visibility: hidden;
  opacity: 0;
  width: 320px;
  background: linear-gradient(160deg, var(--primary-color) 0%, var(--dark-color) 100%);
  color: #fff;
  text-align: left;
  border-radius: 8px;
  padding: 18px 22px;
  position: absolute;
  left: 50%;
  bottom: 120%;
  transform: translateX(-50%);
  z-index: 100;
  font-size: 1.25rem;
  font-weight: 700;
  border: 3px solid var(--dark-color);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  transition: opacity 0.3s, visibility 0.3s;
  line-height: 1.5;
  pointer-events: none;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.footer-tooltip em {
  font-weight: 600;
  font-style: italic;
  color: #ffe0b2;
}

.footer-tooltip br {
  line-height: 2.2;
}

.footer-tooltip-container:hover .footer-tooltip,
.footer-tooltip-container:focus-within .footer-tooltip {
  visibility: visible;
  opacity: 1;
}

@media (max-width: 600px) {
  .footer-tooltip {
    width: 90vw;
    left: 5vw;
    transform: none;
    font-size: 1rem;
    padding: 14px 10px;
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .hero {
    background-position: 76% center; /* Move the background image down on mobile */
  }  
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }


  .hero-buttons .btn:last-child {
    background-color: var(--dark-color);
    border-color: var(--dark-color);
    color: var(--light-color);
  }
  
  .hero-buttons .btn:last-child:hover {
    background-color: rgba(0, 0, 0, 0.8);
    border-color: rgba(0, 0, 0, 0.8);
  }

  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: var(--dark-color);
    padding: var(--spacing-sm) 0;
    text-align: center;
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .nav-links li {
    margin: var(--spacing-xs) 0;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
}

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

.fade-in {
  animation: fadeIn 1s ease forwards;
}

/* You'll need to add classes to your elements to trigger these animations */
.fade-in-1 { animation-delay: 0.2s; }
.fade-in-2 { animation-delay: 0.4s; }
.fade-in-3 { animation-delay: 0.6s; }

/* ===== EXPLODING NAME EFFECT ===== */
.exploding-name {
  display: inline-block;
  position: relative;
  white-space: nowrap;
}
.exploding-name span {
  display: inline-block;
  transition: transform 0.7s cubic-bezier(.23,1.02,.64,1), opacity 0.7s;
  will-change: transform, opacity;
}
.exploding-name.exploded span {
  opacity: 0;
  pointer-events: none;
}