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

html {
  scroll-behavior: smooth;
}

:root {
  --bg: #1a1a1d;
  --sidebar-bg: #1e1e1f;
  --content-bg: #23232a;
  --card-bg: #12110d;
  --accent: #d3c26b;
  --text: #f5f5f5;
  --text-secondary: #d1d1d1;
  --text-muted: #b8b8b8;
  --border: #3d3d40;

  /* Smooth color transitions */
  transition: --accent 1s ease;
}

/* Enable smooth transitions for accent color changes */
* {
  transition: color 0.5s ease, background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

body {
  font-family: "Helvetica", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-y: scroll;
}

.container {
  min-height: 100vh;
  transition: all 0.3s;
  display: flex;
  gap: 30px;
  padding: 30px;
  justify-content: center;
  align-items: center;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 300px;
  background: var(--sidebar-bg);
  border-radius: 20px;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
}

.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), #e67e22);
  overflow: hidden;
  margin-bottom: 25px;
  box-shadow: 0 8px 20px rgba(241, 196, 15, 0.3);
}

.profile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.profile-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

.profile-title {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 30px;
  text-align: center;
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-bottom: 30px;
}

.quote-box-sidebar {
  width: 100%;
  background: rgba(241, 196, 15, 0.05);
  border: 1px solid rgba(241, 196, 15, 0.1);
  padding: 25px 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  text-align: center;
  transition: opacity 0.5s ease-in-out, transform 0.3s;
}

.quote-box-sidebar:hover {
  transform: scale(1.02);
}

.quote-text-sidebar {
  font-size: 1rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 10px;
}

.quote-author-sidebar {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.social-link {
  width: 45px;
  height: 45px;
  background: var(--card-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s;
  font-size: 1.1rem;
}

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

.theme-switcher {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.theme-btn {
  width: 45px;
  height: 45px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.2rem;
}

.theme-btn:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.last-updated {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.last-updated p {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.last-updated p:last-child {
  margin-bottom: 0;
}

/* ===== MAIN CONTENT ===== */

.main-content {
  flex: 1;
  background: var(--content-bg);
  border-radius: 20px;
  overflow-y: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-width: 900px;
  max-height: 90vh;
}

.top-navbar {
  background: rgba(29, 29, 31, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  gap: 5px;
  padding: 25px 40px;
  border-bottom: 1px solid var(--border);
}

.nav-item {
  padding: 12px 30px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s;
  font-family: inherit;
}

.nav-item:hover {
  color: var(--accent);
  background: rgba(241, 196, 15, 0.1);
}

.nav-item.active {
  color: var(--accent);
  background: rgba(241, 196, 15, 0.15);
}

/* Content Wrapper */
.content-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 35px 45px;
}

.content-wrapper::-webkit-scrollbar {
  width: 8px;
}

.content-wrapper::-webkit-scrollbar-track {
  background: var(--card-bg);
}

.content-wrapper::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

.content-wrapper::-webkit-scrollbar-thumb:hover {
  background: #e67e22;
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Page Header */
.page-header {
  margin-bottom: 25px;
}

.page-header h2 {
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 15px;
}

.header-line {
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.section-heading {
  font-size: 1.5rem;
  color: var(--text);
  margin: 30px 0 20px;
}

/* About Section */
.about-intro {
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 35px;
}
.about-intro h1 {
  font-size: 1.7rem;
  color: var(--text);
  margin-bottom: 15px;
}

.about-intro span {
  color: var(--accent);
}

.about-intro p {
  margin-bottom: 20px;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 35px;
}

.service-box {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 15px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.service-box:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.service-icon {
  width: 50px;
  height: 50px;
  background: rgba(241, 196, 15, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.service-content h4 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 10px;
}

.service-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Current Project Box */
.current-project-box {
  background: var(--card-bg);
  border: 2px solid var(--accent);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 35px;
  transition: all 0.3s;
}

.current-project-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(211, 194, 107, 0.2);
}

.project-header {
  margin-bottom: 15px;
}

.project-badge {
  display: inline-block;
  background: rgba(211, 194, 107, 0.15);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.project-header h4 {
  font-size: 1.5rem;
  color: var(--text);
  margin: 10px 0 5px 0;
}

.project-tagline {
  font-size: 1rem;
  color: var(--accent);
  font-style: italic;
  margin: 0 0 15px 0;
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-tag {
  background: rgba(211, 194, 107, 0.1);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid rgba(211, 194, 107, 0.3);
}

.tech-stack-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
  gap: 20px;
  margin-top: 30px;
  padding-bottom: 10px;
}

.tech-stack-grid::-webkit-scrollbar {
  display: none;
}

.tech-logo-item {
  flex-shrink: 0;
  background: var(--card-bg);
  padding: 18px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  aspect-ratio: 1;

  transition: transform 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tech-logo-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.tech-logo-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.tech-logo-item img {
  max-width: 70px;
  max-height: 70px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 30px;
  margin-bottom: 30px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 0;
  width: 2px;
  background: var(--accent);
}

.timeline-item {
  position: relative;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--content-bg);
}

.timeline-item h4 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 8px;
}

.timeline-item .company {
  display: block;
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 5px;
}

.timeline-item .period {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.timeline-item ul {
  list-style: none;
  margin-top: 15px;
}

.timeline-item li {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
}

.timeline-item li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* CV Download Section Styling */
.download-cv-section {
  text-align: left;
  margin: 30px 0 20px;
}

.download-cv-btn {
  padding: 15px 30px;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(241, 196, 15, 0.4);
}

.download-cv-btn:hover {
  background: #e67e22;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(241, 196, 15, 0.5);
}

.download-cv-btn i {
  font-size: 1.1rem;
}

/* --- PORTFOLIO FILTER BAR --- */
.portfolio-filter {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  padding: 8px 15px;
  cursor: pointer;
  transition: color 0.3s, background-color 0.3s, border-radius 0.3s;
  border-radius: 8px;
}

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

.filter-btn.active {
  color: var(--text);
  background-color: var(--card-bg);
  font-weight: 600;
}

/* --- PROJECTS GRID --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
}

.project-card-v2 {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card-v2:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.card-image-placeholder {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
}

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

.card-info {
  padding: 0 5px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text);
}

.project-card-v2:hover .card-title {
  color: var(--accent);
  transition: color 0.3s;
}

.card-category {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

/* --- CONTACT TAB STYLING --- */

.contact-map-container {
  margin-bottom: 30px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.contact-map-container iframe {
  display: block;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 18px 25px;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form ::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(241, 196, 15, 0.2);
}

.contact-form textarea {
  resize: vertical;
}

.send-message-btn {
  align-self: flex-end;
  padding: 15px 30px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(241, 196, 15, 0.4);
}

.send-message-btn:hover {
  background: #e67e22;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(241, 196, 15, 0.5);
}

.send-message-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 650px) {
  .form-row {
    flex-direction: column;
  }
}
/* ========================================================= */
/* --- 5. MEDIA QUERIES (Mobile/Small Devices) --- */
/* ========================================================= */

@media (max-width: 768px) {
  /* 1. CONTAINER & BASE LAYOUT */
  .container {
    display: block;
    padding: 15px;
    min-height: 100vh;
  }

  /* 2. SIDEBAR CHANGES: UNIFY INTO ONE MOBILE CARD */
  .sidebar {
    width: 100%;
    position: static;
    padding: 20px;
    background: var(--sidebar-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-radius: 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    gap: 0;
  }

  /* 3. PROFILE SECTION */
  .profile-section-card-mobile {
    width: 100%;
    padding: 0;
    background: transparent;

    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Profile elements optimized for mobile */
  .profile-img {
    width: 100px;
    height: 100px;
    margin-bottom: 15px;
  }
  .profile-name {
    margin-bottom: 5px;
    font-size: 1.3rem;
  }
  .profile-title {
    margin-bottom: 15px;
    font-size: 0.85rem;
  }

  /* 4. QUOTE AND SOCIAL LINKS */
  .divider {
    margin: 15px 0;
  }

  .quote-box-sidebar {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
  }

  .quote-text-sidebar {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .quote-author-sidebar {
    font-size: 0.75rem;
  }

  .social-links {
    width: 100%;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
  }

  .social-link {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  /* 5. MAIN CONTENT CHANGES */
  .main-content {
    width: 100%;
    margin-left: 0;
    min-height: auto;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow-y: visible;
    max-height: none;
  }

  .content-wrapper {
    padding: 20px;
    overflow-y: visible;
  }

  .page-header h2 {
    font-size: 1.6rem;
  }

  .section-heading {
    font-size: 1.2rem;
    margin: 30px 0 20px;
  }

  .about-intro h1 {
    font-size: 1.4rem;
  }

  .about-intro p {
    font-size: 0.95rem;
  }

  /* 6. NAVBAR & GRID ADJUSTMENTS */
  .top-navbar {
    overflow-x: auto;
    white-space: nowrap;
    justify-content: flex-start;
    padding: 15px 20px;
    margin: 0 0 20px 0;
    border-radius: 20px 20px 0 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .top-navbar::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .service-box {
    padding: 20px;
  }

  .current-project-box {
    padding: 20px;
  }

  .project-header h4 {
    font-size: 1.3rem;
  }

  .project-tech-tags {
    gap: 8px;
  }

  .tech-tag {
    font-size: 0.8rem;
    padding: 5px 12px;
  }

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

  .portfolio-filter {
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 5px;
  }

  .portfolio-filter::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    font-size: 0.9rem;
    padding: 8px 16px;
  }

  .tech-stack-grid {
    gap: 15px;
  }

  .tech-logo-item {
    width: 100px;
  }

  .timeline {
    padding-left: 25px;
  }

  .timeline-item h4 {
    font-size: 1.05rem;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 15px 20px;
    font-size: 0.95rem;
  }
}
