/* ============================================================
   EDIT THIS FILE TO CUSTOMIZE: colors, fonts, spacing, layout
   ============================================================ */

/* ----- Google Fonts ----- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ===== CSS VARIABLES (color palette) ===== */
:root {
  /* EDIT: Adjust any color below to change the entire theme */
  --bg:              #EDE6DB;  /* warm sand (main background) */
  --text-primary:    #2D2926;  /* warm near-black (headings & body) */
  --text-secondary:  #7A7168;  /* warm stone gray (subtle text) */
  --accent-1:        #C75A2A;  /* burnt sienna/orange (CTA, highlights) */
  --accent-2:        #8B9A7B;  /* muted sage green (secondary accents) */
  --surface-light:   #F5F0E8;  /* pale parchment (cards, alt sections) */
  --surface-dark:    #3D3834;  /* deep warm brown (dark sections) */

  /* EDIT: Font families — swap if you prefer different fonts */
  --font-heading: 'Playfair Display', serif;
  --font-body:    'Inter', sans-serif;

  --transition: 0.3s ease;
  --radius: 8px;
  --shadow: 0 2px 20px rgba(45, 41, 38, 0.08);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

/* ===== CANVAS BACKGROUND ===== */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== NAVIGATION ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 0 2rem;
  background: transparent;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

#navbar.visible {
  background: rgba(61, 56, 52, 0.92);
  padding: 0.3rem 2rem;
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.15);
}

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

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#navbar.visible .nav-logo {
  opacity: 1;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: transparent;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: color 0.3s ease, opacity 0.4s ease;
  opacity: 0;
}

#navbar.visible .nav-links a {
  color: rgba(245, 240, 232, 0.75);
  opacity: 1;
}

.nav-links a:hover {
  color: var(--accent-1) !important;
}

/* ===== HAMBURGER MENU ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 101;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: rgba(245, 240, 232, 0.75);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-open .hamburger .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-open .hamburger .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-open .hamburger .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== HERO / WELCOME ===== */
#welcome {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 2rem;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -2px;
  line-height: 1.1;
}

/* EDIT: Welcome subtitle (your name) */
.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text-secondary);
  font-weight: 300;
}

.hero-subtitle .highlight {
  color: var(--accent-1);
  font-weight: 500;
}

/* EDIT: Welcome tagline (your role) */
.hero-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 400;
}

.scroll-arrow {
  width: 22px;
  height: 22px;
  border-right: 2px solid var(--accent-2);
  border-bottom: 2px solid var(--accent-2);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: rotate(45deg) translateY(0);
  }
  40% {
    transform: rotate(45deg) translateY(-8px);
  }
  60% {
    transform: rotate(45deg) translateY(-4px);
  }
}

/* ===== SECTIONS ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 2rem;
  background-color: var(--bg);
}

.section-alt {
  background-color: var(--surface-light);
}

.section-dark {
  background-color: var(--surface-dark);
  color: var(--surface-light);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 3.5rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--accent-1);
  margin: 1rem auto 0;
  border-radius: 2px;
}

.section-title.light {
  color: var(--surface-light);
}

/* ===== SCROLL REVEAL ANIMATION ===== */
.reveal-hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
}

.about-image {
  display: flex;
  justify-content: center;
}

/* EDIT: Profile photo size and border */
.profile-photo-placeholder {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--surface-light), var(--bg));
  border: 4px solid var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.4;
  overflow: hidden;
}

.profile-photo-placeholder img,
.profile-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* EDIT: About name */
.about-text h3 {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

/* EDIT: About title/role */
.about-title {
  color: var(--accent-1);
  font-weight: 500;
  margin-bottom: 1.2rem;
  font-size: 1rem;
}

.about-bio {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-align: center;
  line-height: 1.4;
}

.btn-primary {
  background-color: var(--accent-1);
  color: #fff;
  border-color: var(--accent-1);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--accent-1);
}

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

.btn-outline:hover {
  background-color: var(--text-primary);
  color: var(--bg);
  border-color: var(--text-primary);
}

.btn-lg {
  padding: 1rem 2.8rem;
  font-size: 1.1rem;
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.skills-column h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-2);
  display: inline-block;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.skill-tag {
  background: var(--surface-light);
  color: var(--text-primary);
  padding: 0.55rem 1.3rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 400;
  border: 1px solid rgba(139, 154, 123, 0.35);
  transition: all var(--transition);
  cursor: default;
}

.skill-tag:hover {
  background: var(--accent-2);
  color: #fff;
  border-color: var(--accent-2);
  transform: translateY(-2px);
}

.soft-skills-list {
  list-style: none;
}

.soft-skills-list li {
  padding: 0.8rem 0;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(139, 154, 123, 0.18);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.95rem;
}

.soft-skills-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-2);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== PROJECTS ===== */
/* EDIT: Projects grid — 2×2 centered layout (change repeat(2, 1fr) for more columns) */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.project-card {
  background: var(--surface-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid rgba(139, 154, 123, 0.15);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 30px rgba(45, 41, 38, 0.12);
  border-color: var(--accent-1);
}

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

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* EDIT: Placeholder style when no image is provided */
.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  background: linear-gradient(135deg, var(--bg), var(--surface-light));
  border-bottom: 2px dashed rgba(139, 154, 123, 0.35);
}

.project-info {
  padding: 1.6rem;
}

.project-info h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.project-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-link {
  display: inline-block;
  color: var(--accent-1);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition);
  cursor: pointer;
}

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

/* ===== ACHIEVEMENTS ===== */
.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.achievement-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 1.8rem;
  background: var(--surface-light);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent-2);
  transition: all var(--transition);
}

.achievement-item:hover {
  border-left-color: var(--accent-1);
  transform: translateX(4px);
}

.achievement-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}

.achievement-info h4 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.achievement-date {
  color: var(--accent-1);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.achievement-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== RESUME ===== */
.resume-section {
  text-align: center;
}

.resume-text {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.download-icon {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: start;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--surface-light);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  background: rgba(245, 240, 232, 0.08);
  border: 1px solid rgba(245, 240, 232, 0.2);
  border-radius: var(--radius);
  color: var(--surface-light);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-1);
  background: rgba(245, 240, 232, 0.14);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(245, 240, 232, 0.35);
}

/* Contact form submit button in dark section */
.section-dark .btn-primary {
  background-color: var(--accent-1);
  color: #fff;
  border-color: var(--accent-1);
}

.section-dark .btn-primary:hover {
  background-color: transparent;
  color: var(--accent-1);
}

.contact-info h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--surface-light);
}

.contact-info p {
  color: rgba(245, 240, 232, 0.7);
  margin-bottom: 2rem;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.social-link {
  display: block;
  padding: 0.8rem 1.5rem;
  background: rgba(245, 240, 232, 0.08);
  color: var(--surface-light);
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid rgba(245, 240, 232, 0.15);
  transition: all var(--transition);
  text-align: center;
  font-weight: 400;
}

.social-link:hover {
  background: var(--accent-1);
  border-color: var(--accent-1);
  transform: translateY(-2px);
}

/* ===== FOOTER ===== */
footer {
  background: var(--surface-dark);
  color: var(--text-secondary);
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

/* ===== MODAL OVERLAY (floating window for project details) ===== */
/* EDIT: Change the overlay background opacity (0.7) or the modal max-width */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(45, 41, 38, 0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  position: relative;
  background: var(--surface-light);
  border-radius: var(--radius);
  max-width: 780px;
  width: 92%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(30px) scale(0.97);
  transition: transform 0.35s ease;
  overflow: hidden;
}

.modal-overlay.open .modal-window {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 10;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: all var(--transition);
}

.modal-close:hover {
  color: var(--accent-1);
  background: rgba(199, 90, 42, 0.08);
}

/* EDIT: Scrollable area inside the modal */
.modal-scroll {
  overflow-y: auto;
  padding: 1.5rem 2rem 2.5rem;
  max-height: 85vh;
}

/* EDIT: Image gallery inside modal — horizontal scroll on mobile, grid on desktop */
.modal-gallery {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  margin-bottom: 1.8rem;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.modal-gallery::-webkit-scrollbar {
  height: 6px;
}

.modal-gallery::-webkit-scrollbar-thumb {
  background: var(--accent-2);
  border-radius: 3px;
}

.modal-gallery img {
  flex: 0 0 auto;
  width: 320px;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
  scroll-snap-align: start;
  box-shadow: var(--shadow);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.modal-meta {
  color: var(--accent-1);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.modal-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* EDIT: Technology tags inside modal */
.modal-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
}

.modal-tech .skill-tag {
  background: var(--bg);
}

/* Hide modal-link if href is empty or "#" */
.modal-link[href="#"] {
  display: none;
}

/* ==============================================================
   RESPONSIVE
   ============================================================== */

/* ---- 640px & below: phones, hamburger menu, single column ---- */
@media (max-width: 640px) {

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(61, 56, 52, 0.97);
    backdrop-filter: blur(12px);
    padding: 0;
    display: none;
    gap: 0;
  }

  .nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 1rem 2rem;
    font-size: 1rem;
    letter-spacing: 0.8px;
    border-bottom: 1px solid rgba(245, 240, 232, 0.08);
    text-align: center;
  }

  /* Force nav links visible when menu is toggled open, even before scroll */
  .nav-open .nav-links a,
  .nav-open#navbar .nav-links a,
  .nav-open#navbar.visible .nav-links a {
    color: rgba(245, 240, 232, 0.8) !important;
    opacity: 1 !important;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-text .btn {
    margin: 0 auto;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

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

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

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

  .achievement-item {
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.2rem 1.4rem;
  }

  .section {
    padding: 60px 1.2rem;
  }

  .profile-photo-placeholder {
    width: 200px;
    height: 200px;
  }

  .container {
    padding: 0 1rem;
  }

  /* Modal on small screens — narrower window, smaller gallery images */
  .modal-window {
    width: 96%;
    max-height: 90vh;
  }

  .modal-scroll {
    padding: 1.2rem 1.2rem 2rem;
  }

  .modal-gallery img {
    width: 260px;
    height: 180px;
  }

  .modal-title {
    font-size: 1.4rem;
  }
}

/* ---- 641px–768px: small tablets portrait, tighter two-column layouts ---- */
@media (min-width: 641px) and (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .skills-grid {
    gap: 2rem;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .contact-grid {
    gap: 2rem;
  }

  .section {
    padding: 70px 1.5rem;
  }

  .profile-photo-placeholder {
    width: 220px;
    height: 220px;
  }
}

/* ---- 480px & below: small phone tweaks ---- */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2.8rem;
    letter-spacing: -1px;
  }

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

  .skill-tags {
    gap: 0.5rem;
  }

  .skill-tag {
    font-size: 0.8rem;
    padding: 0.45rem 1rem;
  }
}
