/* ===== CSS VARIABLES ===== */
:root {
  --primary-color: #8B7355;
  --secondary-color: #A0522D;
  --accent-color: #D2691E;
  --accent-hover: #B8860B;
  --text-primary: #2F2F2F;
  --text-secondary: #5D5D5D;
  --text-light: #8B8B8B;
  --bg-primary: #FAFAFA;
  --bg-secondary: #F5F5F0;
  --bg-dark: #2F2F2F;
  --border-color: #E8E8E8;
  --shadow-sm: 0 1px 3px rgba(139, 115, 85, 0.1);
  --shadow-md: 0 4px 6px rgba(139, 115, 85, 0.1);
  --shadow-lg: 0 10px 15px rgba(139, 115, 85, 0.1);
  --shadow-xl: 0 20px 25px rgba(139, 115, 85, 0.1);
  --gradient-primary: linear-gradient(135deg, #8B7355 0%, #A0522D 100%);
  --gradient-secondary: linear-gradient(135deg, #D2691E 0%, #B8860B 100%);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.3s ease;
}

/* ===== GLOBAL RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

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

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(250, 250, 250, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: var(--transition);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

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

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

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

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F5F5F0 0%, #E8E8E8 100%);
  position: relative;
}

.hero-container {
  text-align: center;
  color: var(--text-primary);
  z-index: 2;
  position: relative;
  max-width: 800px;
  padding: 0 20px;
}

.hero-image {
  position: relative;
  margin-bottom: 2rem;
}

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.profile-img:hover {
  transform: scale(1.02);
  border-color: var(--accent-color);
}

.hero-title {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.name {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.title {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.hero-subtitle {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-link {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

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

/* ===== SECTIONS ===== */
.section {
  padding: 100px 0;
  position: relative;
}

.section:nth-child(even) {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-primary);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* ===== ABOUT SECTION ===== */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  text-align: center;
}

.skills h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  text-align: center;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.skill-tag {
  padding: 8px 16px;
  background: var(--bg-secondary);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.skill-tag:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* ===== PHOTOGRAPHY SECTION ===== */
.photography-intro {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.photography-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.photo-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  background: white;
  border: 1px solid var(--border-color);
}

.photo-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-color);
}

.photo-container {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

/* Specific positioning for Golden Gate photo */
.photo-card:nth-child(2) .photo-img {
  object-position: center 20%;
}

/* Specific positioning for Zambezi River photo */
.photo-card:nth-child(3) .photo-img {
  object-position: center 80%;
}

/* Specific positioning for California Quail photo */
.photo-card:nth-child(4) .photo-img {
  object-position: center 95%;
}

/* Specific positioning for Elephant photo */
.photo-card:nth-child(5) .photo-img {
  object-position: center 70%;
}

/* Specific positioning for Safari photo */
.photo-card:nth-child(6) .photo-img {
  object-position: center center;
}

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

.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(139, 115, 85, 0.9) 0%,
    rgba(160, 82, 45, 0.8) 50%,
    rgba(210, 105, 30, 0.9) 100%
  );
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.photo-card:hover .photo-overlay {
  opacity: 1;
}

.photo-info {
  text-align: center;
  color: white;
  transform: translateY(20px);
  transition: var(--transition);
}

.photo-card:hover .photo-info {
  transform: translateY(0);
}

.photo-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.photo-story {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  max-height: 120px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}

.photo-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.photo-location,
.photo-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.photo-location i,
.photo-date i {
  font-size: 0.9rem;
}

.photography-cta {
  text-align: center;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.cta-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* ===== PROJECTS SECTION ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  position: relative;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-color);
}

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

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

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  padding: 4px 12px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.project-link:hover {
  color: var(--accent-hover);
  transform: translateX(5px);
}

/* ===== CONTACT SECTION ===== */
.contact-content {
  max-width: 800px;
  margin: 0 auto;
}

.contact-description {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  line-height: 1.6;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.contact-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-color);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: var(--primary-color);
  border: 1px solid var(--border-color);
}

.contact-card:hover .contact-icon {
  background: var(--primary-color);
  color: white;
}

.contact-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.contact-card p {
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-dark);
  color: white;
  text-align: center;
  padding: 2rem 0;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  z-index: 1000;
}

.back-to-top:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow-md);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .name {
    font-size: 2.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 200px;
    justify-content: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-cards {
    grid-template-columns: 1fr;
  }

  .photography-gallery {
    grid-template-columns: 1fr;
  }

  .photo-container {
    height: 250px;
  }

  .photo-overlay {
    padding: 1.5rem;
  }

  .photo-title {
    font-size: 1.3rem;
  }

  .photo-story {
    font-size: 0.9rem;
    max-height: 100px;
    -webkit-line-clamp: 4;
  }

  .photo-meta {
    gap: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .section {
    padding: 60px 0;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-top: 90px;
  }
  .profile-img {
    width: 110px;
    height: 110px;
    margin-top: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .name {
    font-size: 2rem;
  }

  .profile-img {
    width: 150px;
    height: 150px;
  }

  .hero-buttons {
    gap: 1rem;
  }

  .btn {
    width: 180px;
    padding: 10px 20px;
  }
}

/*Safari’s handling of position: fixed and viewport units (vh) can differ from Chrome. Add extra top padding to the .hero section specifically for Safari/iOS */
@media not all and (min-resolution:.001dpcm) { @supports (-webkit-touch-callout: none) {
  .hero {
    padding-top: 110px !important;
  }
}}

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
