/* remove browser default margins */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: #fff;
    text-align: center;
}

body {
    font-family: 'Inter', sans-serif;
}

/* Navigation */
.navbar {
    background-color: #111827;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

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

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

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

.nav-menu {
    list-style: none;
    display: none;
    flex-direction: column;
    gap: 0;
    margin-top: 1rem;
}

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

.nav-menu li a {
    display: block;
    color: #d1d5db;
    text-decoration: none;
    padding: 0.75rem 0;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-menu li a:hover {
    color: #fff;
}

section {
    padding: 2rem 1rem;
}

#hero {
    min-height: 40vh;
    background-color: #1F2937;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#hero p:first-of-type {
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

#projects {
    min-height: 100vh;
    background-color: #111827;
}

.project-cards-grid {
    max-width: 400px;
    margin: 0 auto;
}

.project-card {
    background-color: #374151;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 1.5rem;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.project-card .container {
    padding: 1.25rem;
}

.project-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.project-card p {
    font-size: 0.85rem;
    color: #fff;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.project-btn {
    display: inline-block;
    color: #60A6FA;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.project-btn:hover {
    color: #93C5FD;
}

.project-card img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 5px 5px 0 0;
}

#skills {
    min-height: 50vh;
    background-color: #1F2937;
    color: #fff;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.skill-item {
    background-color: #374151;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.skill-item:hover {
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.4);
}

#experience {
    min-height: 50vh;
    background-color: #111827;
    color: #fff;
}

/* Card container */
.job-card {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #1e1e35;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* Clickable header bar */
.job-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: #5c5fc4;
  cursor: pointer;
  user-select: none;
  gap: 8px;
  transition: background 0.2s;
}

.job-header:hover {
  background: #6668d4;
}

.job-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex: 1;
  flex-basis: calc(100% - 44px);
}

.job-dates {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  order: 3;
  flex-basis: 100%;
}

/* +/× toggle icon */
.toggle-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.35s ease;
}

.job-card.open .toggle-btn {
  transform: rotate(45deg);
}

/* Collapsible body */
.job-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.job-card.open .job-body {
  max-height: 500px;
}

.job-body-inner {
  padding: 16px;
}

/* Circular logo */
.job-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #1F2937;
  object-fit: cover;
  margin-bottom: 12px;
  overflow: hidden;
}

.job-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job-logo img.logo-contain {
  width: 100%;
  height: 75%;
  object-fit: contain;
}

img.job-logo {
  background: #fff;
}

/* Location / website row */
.job-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

/* Description */
.job-desc {
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 20px;
}

/* Skill tags */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#contact {
    min-height: 50vh;
    background-color: #1F2937;
}

#contact form {
    max-width: 500px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    color: #d1d5db;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: #1F2937;
    border: 1px solid #374151;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3B82F6;
    border-width: 3px;
}

#contact button[type="submit"] {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(to right, #3B82F6, #60A5FA);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

#contact button[type="submit"]:hover {
    opacity: 0.9;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-links a {
    color: #9ca3af;
    transition: color 0.2s, transform 0.2s;
}

.social-links a:hover {
    color: #fff;
    transform: translateY(-3px);
}

@media (min-width: 768px) {
    /* Desktop Navigation */
    .navbar {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding: 1rem 2rem;
    }

    .hamburger {
        display: none;
    }

    .nav-menu {
        display: flex;
        flex-direction: row;
        gap: 2rem;
        margin-top: 0;
    }

    .nav-menu li a {
        padding: 0.5rem 0;
    }

    section {
        padding: 3rem 2rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    #hero {
        min-height: 50vh;
    }

    #hero p:first-of-type {
        font-size: 1.25rem;
    }

    /* Project cards in 2-column grid */
    #projects {
        padding: 3rem 2rem;
    }

    .project-cards-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        max-width: 900px;
        margin: 0 auto;
    }

    .project-card {
        margin-bottom: 0;
    }

    .project-card img {
        height: 200px;
    }

    .project-card h4 {
        font-size: 1.1rem;
    }

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

    /* Job cards */
    .job-header {
        flex-wrap: nowrap;
        padding: 18px 24px;
        gap: 16px;
    }

    .job-title {
        font-size: 15px;
        flex-basis: auto;
    }

    .job-dates {
        font-size: 14px;
        margin-right: 16px;
        order: 0;
        flex-basis: auto;
    }

    .toggle-btn {
        width: 28px;
        height: 28px;
        font-size: 24px;
    }

    .job-body-inner {
        padding: 24px;
    }

    .job-logo {
        width: 64px;
        height: 64px;
        font-size: 24px;
        margin-bottom: 16px;
    }

    .job-meta {
        gap: 20px;
    }

    .meta-item {
        font-size: 13px;
    }

    .job-desc {
        font-size: 14px;
    }

    .tag {
        font-size: 12px;
        padding: 5px 14px;
    }

    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    #experience .job-card {
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }

    #contact form {
        max-width: 600px;
    }
}

@media (min-width: 1024px) {
    section {
        padding: 4rem 3rem;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    #hero {
        min-height: 60vh;
    }

    #hero p:first-of-type {
        font-size: 1.5rem;
    }

    #hero p:last-of-type {
        max-width: 600px;
    }

    .project-cards-grid {
        max-width: 1000px;
        gap: 2rem;
    }

    .project-card img {
        height: 220px;
    }

    .skills-grid {
        max-width: 900px;
        grid-template-columns: repeat(4, 1fr);
    }

    #experience .job-card {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Footer */
footer {
    background-color: #111827;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.85rem;
}

