/* ===============================
   CSS RESET
================================= */

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

img {
  max-width: 100%;
  display: block;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===============================
   THEME VARIABLES
================================= */

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f7fa;
  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --accent: #2563eb;
  --accent-hover: #1e40af;
  --border-color: #e2e8f0;
}

html[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --border-color: #334155;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}


/*==========================*/
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}
/* ===============================
   LAYOUT SYSTEM
================================= */

.container {
  width: min(1100px, 90%);
  margin: 0 auto;
}

section {
  padding: 4rem 0;
}

.section-header {
  margin-bottom: 2rem;
}

/* ===============================
   HEADER
================================= */

.site-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 1.4rem;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
}

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

#theme-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}



/* ===============================
   BUTTONS
================================= */

.btn {
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

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

.btn.secondary {
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===============================
   PROJECTS SECTION
================================= */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ===============================
   FOOTER
================================= */

.site-footer {
    background: var(--bg-secondary);
    padding: 4rem 0;
    margin-top: 5rem;
    text-align: center;
}

.footer-title {
    margin-bottom: 1.8rem;
    font-weight: 500;
}

.footer-inline-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

    .footer-inline-links a {
        text-decoration: none;
        color: var(--text-secondary);
        font-weight: 500;
        transition: color 0.2s ease;
    }

        .footer-inline-links a:hover {
            color: var(--accent);
        }

    .footer-inline-links span {
        color: var(--border-color);
    }

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

@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }
}


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

.project-card h3 {
  margin: 0.8rem 0 0.5rem 0;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.project-card a {
  text-decoration: none;
  color: inherit;
}

.project-detail-section {
    padding: 4rem 0;
}

.project-detail {
    max-width: 900px;
    margin: 0 auto;
}

    .project-detail h2 {
        margin-bottom: 1rem;
    }

.project-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.project-media {
    margin-bottom: 2rem;
}

.project-detail section {
    margin-bottom: 2rem;
}

.project-detail ul {
    padding-left: 1.2rem;
    margin-top: 0.5rem;
}

.challenge-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.project-media img,
.project-media video {
    margin-bottom: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    width: 100%;
}

.tag-container {
    margin-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag-chip {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    background: var(--accent);
    color: white;
}

    .tag-chip.subtle {
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        color: var(--text-secondary);
    }

.project-grid {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-card {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
    overflow: hidden;
}

    .project-card img {
        border-radius: 10px;
        transition: transform 0.4s ease;
    }

    .project-card:hover {
        transform: translateY(-6px) scale(1.02);
        border-color: var(--accent);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    }

        .project-card:hover img {
            transform: scale(1.05);
        }

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-section {
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 3rem;
    align-items: start;
}

.about-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-color);
}

    .about-card img {
        width: 160px;
        height: 160px;
        object-fit: cover;
        border-radius: 50%;
        margin: 0 auto 1rem;
        border: 3px solid var(--accent);
    }

.about-role {
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

.skills-section {
    padding: 5rem 0;
}

.skills-grid {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
}

    .skill-card:hover {
        transform: translateY(-4px);
        border-color: var(--accent);
    }

    .skill-card h3 {
        margin-bottom: 1rem;
    }

    .skill-card ul {
        list-style: none;
        padding-left: 0;
    }

    .skill-card li {
        margin-bottom: 0.5rem;
        color: var(--text-secondary);
    }

    .contact-card:hover {
        transform: translateY(-4px);
        border-color: var(--accent);
    }

    .contact-card h4 {
        margin-bottom: 0.5rem;
    }

.nav-btn {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s ease;
}

    .nav-btn:hover {
        background: var(--accent-hover);
    }

.nav-icon {
    width: 20px;
    height: 20px;
    transition: opacity 0.2s ease;
}

    .nav-icon:hover {
        opacity: 0.7;
    }

html {
    scroll-behavior: smooth;
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.project-year {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
}

.project-content {
    margin-top: 1rem;
}

.project-meta-small {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

/* ===============================
   FILTER BAR (GROUPED VERSION)
================================= */

.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.filter-group-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 0.8rem;
    min-width: 110px;
}

.filter-btn {
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

    .filter-btn.active {
        background: var(--accent);
        color: white;
        border-color: var(--accent);
    }

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

.projects-section .section-header {
    margin-bottom: 1rem;
}

.filter-bar {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}