/* ========================================
   Portfolio CSS - Complete Stylesheet
   ======================================== */

/* Google Fonts */
@import url(https://fonts.googleapis.com/css?family=Raleway:100,200,300,regular,500,600,700,800,900,100italic,200italic,300italic,italic,500italic,600italic,700italic,800italic,900italic);

/* ========================================
   CSS Variables
   ======================================== */
:root {
  /* Colors */
  --primary-color: #f1f1f1;
  --secondary-color: #f8f9fa;
  --bg-primary: #ffffff;
  --text-color: #222222;
  --text-color-two: #ffffff;
  --bg-secondary: #000000;
  --card-background: #f4f4f4;
  --bg-secondary-two: #111111;

  --shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.15);

  /* Font Weight */
  --weight-small: 400;
  --weight-semibold: 600;
  --weight-bold: 800;

  /* Max width */
  --width-small: 600px;
  --width-medium: 1100px;
  --width-large: 1300px;
}

/* Dark Theme */
[data-theme="dark"] {
  --primary-color: #f1f1f1;
  --secondary-color: #f8f9fa;
  --bg-primary: #000000;
  --text-color: #ffffff;
  --text-color-two: #222222;
  --bg-secondary: #ffffff;
  --card-background: #111111;
  --bg-secondary-two: #f4f4f4;
  --shadow: 0 2px 10px rgba(95, 95, 95, 0.2);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Reset & Base Styles
   ======================================== */
html {
  font-size: 100%;
  scroll-behavior: smooth;
}

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

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

body {
  background: var(--bg-primary);
  color: var(--text-color);
  font-family: "Raleway", sans-serif;
  line-height: 1.5;
}

/* Text Selection */
h1::selection,
h2::selection {
  color: #111;
  background: var(--primary-color);
}

/* ========================================
   Utilities
   ======================================== */
.container {
  max-width: var(--width-medium);
  margin: 0 auto;
  padding: 1rem 2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.9rem;
  border-radius: 30px;
  text-transform: uppercase;
  font-size: 0.82rem;
  transition: 0.3s;
}

.btn-primary {
  background: var(--primary-color);
  color: #000000;
}

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

.btn-secondary {
  margin: 5px 0;
  background-color: var(--bg-secondary);
  color: var(--bg-primary);
}

/* ========================================
   Dark Mode Toggle
   ======================================== */
#switch {
  display: none;
}

.toggle-icons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.toggle-icons > img {
  transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  width: 30px;
}

.moon {
  transform: rotate(10deg);
}

#switch:checked + .toggle-icons .moon {
  transform: rotate(250deg);
}

#switch:checked + .toggle-icons .sun {
  transform: rotate(100deg);
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--bg-primary);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  height: 80px;
  width: 100%;
}

.navbar .nav-menu {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
}

.navbar .nav-link {
  margin: 0 1rem;
  font-size: 0.8rem;
  font-weight: var(--weight-semibold);
}

.navbar #logo img {
  display: block;
  width: 40px;
}

.navbar .btn {
  margin-right: 1.5rem;
}

.fas.fa-arrow-right {
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

/* Hamburger Menu */
.hamburger {
  margin-bottom: 0.1rem;
  display: none;
}

.bar {
  display: block;
  width: 23px;
  height: 3px;
  margin: 4px auto;
  transition: all 0.3s ease-in-out;
  border-radius: 30px;
  background-color: var(--bg-secondary);
}

/* ========================================
   Scroll Offset for Fixed Navbar
   ======================================== */
/* Compensate for fixed navbar height when clicking anchor links */
section[id] {
  scroll-margin-top: 100px;
}

/* ========================================
   Hero Section
   ======================================== */
#hero {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 8rem;
  padding: 1rem;
}

.header-container > div {
  margin-top: 1rem;
}

.content-text {
  text-align: center;
  margin: 1.5rem 0;
}

.content-text h2 {
  font-size: 3rem;
  line-height: 1.2;
  transition: 0.2s ease-in-out;
}

.content-text p {
  padding: 0.5rem;
  margin: 0 auto;
  max-width: 700px;
}

.profile-image {
  width: 150px;
  border-radius: 50%;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  from {
    transform: translateY(0px);
  }
  to {
    transform: translateY(-10px);
  }
}

.division {
  width: 100%;
  height: 2px;
  background-color: var(--card-background);
  margin: 5.5rem 0;
}

/* ========================================
   Skills Section
   ======================================== */
#Skills {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.skills-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  font-family: "Raleway", sans-serif;
  box-shadow: var(--shadow-sm);
}

.skills-table th,
.skills-table td {
  border: 1px solid #ddd;
  padding: 14px 18px;
  text-align: left;
  font-size: 0.9rem;
}

.skills-table th {
  background-color: var(--card-background);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Dark mode - Skills Table */
[data-theme="dark"] .skills-table th {
  background-color: #111111;
  color: var(--text-color);
}

[data-theme="dark"] .skills-table td {
  border: 1px solid #f1f1f1;
}

[data-theme="dark"] .skills-table tr:hover {
  background-color: #222222;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 6px 12px;
  margin: 4px;
  border-radius: 0;
  font-size: 0.85rem;
  font-weight: var(--weight-semibold);
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.badge:hover {
  transform: scale(1.05);
}

/* Badge Colors by Technology */
.badge.html { background: #e34c26; }
.badge.css { background: #264de4; }
.badge.js { background: #f7df1e; color: #000; }
.badge.react { background: #61dafb; color: #000; }
.badge.bootstrap { background: #563d7c; }
.badge.jquery { background: #0769ad; }
.badge.figma { background: #f24e1e; }
.badge.php { background: #4f5b93; }
.badge.laravel { background: #ff2d20; }
.badge.python { background: #3776ab; }
.badge.mysql { background: #00618a; }
.badge.mongo { background: #47a248; }
.badge.git { background: #f1502f; }
.badge.github { background: #333; }
.badge.gitlab { background: #fc6d26; }
.badge.jira { background: #0052cc; }
.badge.sonar { background: #4e9bcf; }

/* Dark mode - Badges */
[data-theme="dark"] .badge {
  box-shadow: none;
}

/* ========================================
   Projects Section
   ======================================== */
#projects {
  display: flex;
  flex-direction: column;
  margin: 2rem auto 5rem;
  padding-top: 2rem;
}

#projects .btn {
  align-self: center;
  margin: 2rem 0;
}

.project {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(250px, auto);
  grid-gap: 0.9rem;
}

/* Project Cards */
.card {
  padding: 1rem;
  background: var(--card-background);
  color: #ffffff;
  border-radius: 5px;
  transition: 0.4s ease-in-out;
  cursor: pointer;
}

.card a {
  color: #ffffff;
  transition: 0.25s ease-in-out;
  font-size: 1rem;
  margin-right: 0.3rem;
}

.card a:hover {
  color: var(--primary-color);
}

.card:hover {
  box-shadow: inset 0 100px 1000px 10px rgba(0, 0, 0, 0.8);
}

.card:hover .project-info {
  opacity: 1;
}

.card .project-bio p {
  font-size: 0.83rem;
}

.card .project-bio h3 {
  font-size: 0.9rem;
}

.project-info {
  display: flex;
  justify-content: space-between;
  opacity: 0;
  position: relative;
  transition: 0.5s ease-in-out;
}

.project-bio {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  top: 160px;
  left: 10px;
}

/* Project Background Images */
.card:nth-child(1) {
  background: url(../assets/project/rh-management-project.png) center center/cover;
}

.card:nth-child(2) {
  background: url(../assets/project/project-portfolio.png) center center/cover;
}

.card:nth-child(3) {
  background: url(../assets/project/e-commerce-store-project.png) center center/cover;
}


/* ========================================
   Contact Section
   ======================================== */
#contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem auto 5rem;
  padding-top: 2rem;
  width: 90%;
  max-width: var(--width-medium);
  background: var(--primary-color);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

#contact h2 {
  font-size: 2rem;
  font-weight: var(--weight-bold);
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

#contact p {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: var(--text-color);
  max-width: 600px;
}

.contact-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  border-radius: 6px;
  font-weight: var(--weight-semibold);
  background: var(--bg-secondary);
  color: var(--text-color-two);
  transition: background 0.3s ease, transform 0.2s ease;
  flex: 1 1 auto;
  min-width: 140px;
  justify-content: center;
}

.contact-actions .btn:hover {
  background: var(--bg-secondary-two);
  transform: translateY(-2px);
}

/* Dark mode - Contact */
[data-theme="dark"] #contact {
  background: var(--card-background);
}

[data-theme="dark"] #contact h2,
[data-theme="dark"] #contact p {
  color: var(--text-color);
}

/* ========================================
   Footer
   ======================================== */
#footer {
  background: #111111;
}

#footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  min-height: 80px;
  text-align: center;
}

#footer a {
  font-size: 1.2rem;
  color: #fff;
  transition: color 0.3s ease;
}

#footer a:hover {
  color: #f1f1f1;
}

#footer .social {
  margin: 1rem 0;
}

#footer .social a {
  margin: 0 0.6rem;
}

#footer p {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablets and below */
@media (max-width: 1000px) {
  .project {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-container {
    margin-top: 7rem;
    text-align: center;
  }

  .content-text h2 {
    font-size: 2.5rem;
  }
}

/* Mobile Menu */
@media (max-width: 670px) {
  .navbar .nav-menu {
    position: fixed;
    right: -100vw;
    top: 4.5rem;
    flex-direction: column;
    width: calc(80% - 10px);
    transition: 0.3s;
    box-shadow: var(--shadow);
    padding: 2rem;
    border-radius: 5px;
    align-items: flex-start;
  }

  .navbar .btn {
    margin: 0;
    margin-top: 1rem;
  }

  .nav-menu.active {
    right: 20px;
  }

  .nav-menu .nav-link {
    font-size: 0.9rem;
    margin: 0 0.2rem;
  }

  .nav-menu li {
    margin-bottom: 0.5rem;
    width: 100%;
  }

  .nav-menu .btn {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }

  .hamburger {
    display: block;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
  }

  .hamburger.active {
    border: 1px dotted gray;
  }

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

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

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

/* Small Mobile */
@media (max-width: 600px) {
  .project {
    display: grid;
    grid-template-columns: 1fr;
  }

  .header-container .btn {
    border-radius: 5px;
    width: 80%;
  }

  #contact {
    padding: 2rem 1rem;
  }

  #contact h2 {
    font-size: 1.5rem;
  }

  .contact-actions {
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
  }

  .contact-actions .btn {
    width: 100%;
  }
}