/* ===============================
   CSS VARIABLES & RESET
================================ */
:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --border: #e5e7eb;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ===============================
   LAYOUT
================================ */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 2rem;
}

.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

/* ===============================
   HEADER
================================ */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

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

.subtitle {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ===============================
   HERO SECTION
================================ */
.hero {
  padding: 4rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  color: var(--muted);
  max-width: 520px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.hero-tags span {
  padding: 0.4rem 0.9rem;
  background: var(--primary);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
}

.hero-profile img {
  width: 100%;
  border-radius: 20px;
}

/* ===============================
   BUTTONS
================================ */
.btn {
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

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

/* ===============================
   CARDS
================================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  transition: transform 0.25s ease;
}

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

.card h2 {
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 1.25rem 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

/* ===============================
   TAGS
================================ */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tags span {
  padding: 0.45rem 0.9rem;
  background: var(--primary);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
}

/* ===============================
   PROJECTS
================================ */
.project {
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.05),
    rgba(37, 99, 235, 0.02)
  );
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.project h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.project p {
  color: var(--muted);
}

.project ul {
  list-style: none;
  margin: 1rem 0;
}

.project ul li {
  padding-left: 1.3rem;
  position: relative;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.project ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary);
}

.project-tech {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===============================
   EDUCATION
================================ */
.education-item {
  margin-bottom: 1.25rem;
}

.education-item h4 {
  font-size: 0.95rem;
}

.education-school {
  color: var(--primary);
  font-size: 0.85rem;
}

.education-year {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ===============================
   EXPERIENCE TIMELINE
================================ */
.experience-timeline {
  position: relative;
  padding-left: 1.5rem;
}

.experience-timeline::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.experience-item {
  position: relative;
  margin-bottom: 1.25rem;
}

.experience-dot {
  position: absolute;
  left: -1.1rem;
  top: 0.3rem;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--primary);
  border-radius: 50%;
}

.experience-company {
  color: var(--primary);
  font-size: 0.8rem;
}

.experience-year {
  color: var(--muted);
  font-size: 0.75rem;
}

/* ===============================
   GALLERY MODAL
================================ */
.gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
}

.modal-content {
  background: var(--card);
  width: 90%;
  max-width: 900px;
  height: 90vh;
  margin: auto;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
}

.close-btn {
  font-size: 1.8rem;
  cursor: pointer;
}

.modal-gallery {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  overflow-y: auto;
}

.modal-gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

/* ===============================
   IMAGE LIGHTBOX
================================ */
.image-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  padding: 2rem;
}

.image-lightbox img {
  max-width: 90%;
  max-height: 85vh;
  margin: auto;
  display: block;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
}

/* ===============================
   CONTACT MODAL (FIXED)
================================ */
.contact-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  z-index: 1000;
}

.contact-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-modal-content {
  background: var(--card);
  border-radius: 16px;
  padding: 2rem;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: modalFade 0.25s ease;
}

/* Header */
.contact-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.contact-modal-header h2 {
  font-size: 1.4rem;
  margin: 0;
}

/* Close button (FIXED) */
.close-contact-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

.close-contact-btn:hover {
  color: var(--text);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-family: inherit;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

/* Actions */
.contact-form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.send-btn {
  flex: 1;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.send-btn:hover {
  opacity: 0.9;
}

.cancel-btn {
  flex: 1;
  background: #e5e7eb;
  border: none;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
}

.cancel-btn:hover {
  background: #d1d5db;
}

/* Animation */
@keyframes modalFade {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .contact-modal-content {
    padding: 1.5rem;
  }
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
  .grid,
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 1.5rem;
  }

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

/* ===============================
   HEADER ACTIONS
================================ */
.actions {
  display: flex;
  gap: 1rem;
}

/* ===============================
   HAMBURGER MENU
================================ */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ===============================
   MOBILE MENU
================================ */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.mobile-menu.active {
  display: flex;
}

/* ===============================
   RESPONSIVE HEADER
================================ */
@media (max-width: 768px) {

  .desktop-actions {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .header-content {
    align-items: center;
  }

  .mobile-menu .btn {
    width: 100%;
    text-align: center;
  }
}
