:root {
  --bg-color: #fdfbf7;
  --bg-gradient: radial-gradient(circle at 50% 0%, #fff 0%, #fdfbf7 100%);
  --text-main: #2d2e30;
  --text-secondary: #57534e;
  --accent-primary: #37793a;
  --accent-secondary: #a855f7;
  --accent-gradient: linear-gradient(135deg, #3c4b37 0%, #358546 100%);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.05);
  --card-hover-bg: rgba(255, 255, 255, 1);
  --nav-bg: rgba(253, 251, 247, 0.8);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Space Grotesk', sans-serif;
  text-decoration: none;
  scroll-behavior: smooth;
  list-style: none;
}

body {
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: #d6d3d1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a29e;
}

header {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: 1200px;
  background-color: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.8rem 2rem;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  z-index: 1000;
}

.logo {
  color: var(--text-main);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links li a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

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

.visit-btn {
  padding: 0.6rem 1.5rem;
  border-radius: 100px;
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  cursor: pointer;
  background: var(--accent-gradient);
  transition: opacity 0.3s ease;
}

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

#menu-icon {
  font-size: 1.5rem;
  color: var(--text-main);
  display: none;
  cursor: pointer;
}

section {
  min-height: auto;
  padding: 4rem 10%;
  width: 100%;
  position: relative;
}

.section-title {
  text-align: center;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  background: linear-gradient(to bottom, #78716c, #d6d3d1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: color 1s ease;
}

.section-title.active-title {
  color: var(--text-main);
}

.about {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 12rem;
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5rem;
  width: 100%;
  max-width: 1100px;
}

.about img {
  width: 250px;
  height: 250px;
  border-radius: 30px;
  /* Squircle */
  object-fit: cover;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transform: rotate(-3deg);
  transition: transform 0.3s ease;
}

.about img:hover {
  transform: rotate(0deg) scale(1.02);
}

.info-box {
  max-width: 600px;
}

.info-box h3 {
  font-size: 1.2rem;
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.info-box h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.info-box span {
  font-size: 1.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  display: block;
  margin-bottom: 1.5rem;
}

.info-box p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.btn-group {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
  border-radius: 100px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-main);
  line-height: 1;
}

.btn:hover {
  background: var(--text-main);
  color: white;
  transform: translateY(-2px);
}

.socials {
  margin-top: 2rem;
  display: flex;
  gap: 1.5rem;
}

.socials a i {
  font-size: 1.5rem;
  color: var(--text-secondary);
  transition: 0.3s ease;
}

.socials a:hover i {
  color: var(--text-main);
}

.tech-stack {
  margin-top: 3rem;
  width: 100%;
  max-width: 1000px;
}

.tech-stack h2 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
}

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

.bento-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  transition: transform 0.3s ease, background 0.3s ease;
}

.bento-card:hover {
  background: var(--card-hover-bg);
  transform: translateY(-5px);
}

.bento-card h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.tech-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.03);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-main);
  border: 1px solid transparent;
  transition: border 0.3s ease;
}

.tech-list li:hover {
  border-color: var(--glass-border);
}

.tech-list img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
  opacity: 0.3;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  background: var(--bg-color);
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  position: absolute;
  top: 24px;
  right: -8px;
  z-index: 1;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -8px;
}

.timeline-content {
  padding: 1.5rem;
  background: var(--glass-bg);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 20px;
  transition: transform 0.3s ease;
}

.timeline-content:hover {
  background: var(--card-hover-bg);
}

.timeline-content h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.timeline-content h4 {
  font-size: 0.95rem;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.timeline-content .date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.05);
  padding: 4px 10px;
  border-radius: 100px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
  background: var(--card-hover-bg);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 16px;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

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

.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  font-weight: 600;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  line-height: 1.6;
}

.project-card ul.svg-icon-list {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  list-style: none;
  padding: 0;
}

.project-card ul.svg-icon-list li:hover {
  border-color: var(--glass-border);
}

.project-card ul.svg-icon-list .svg-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.btn-group {
  display: flex;
  gap: 1rem;
  width: 100%;
  justify-content: center;
}

.btn-group div {
  flex: 1;
  display: flex;
}

.btn-group .btn {
  width: 100%;
  padding: 0.6rem 0;
  font-size: 0.9rem;
}

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.article {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.article:hover {
  transform: translateX(10px);
  background: var(--card-hover-bg);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.article img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
}

.article-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-info .year {
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
}

.article-info .title {
  font-size: 1.2rem;
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 0;
}

.article-info a {
  display: inline-block;
  margin-top: 0.5rem;
}

.upright-icon {
  width: 20px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  filter: none;
}

.article:hover .upright-icon {
  opacity: 1;
}

footer {
  padding: 4rem 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  margin-top: 4rem;
}

footer ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

footer ul li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

footer ul li a:hover {
  color: var(--text-main);
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-container {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }

  .info-box h1 {
    font-size: 3rem;
  }

  .about img {
    width: 200px;
    height: 200px;
  }

  .tech-list img {
    width: 24px;
    height: 24px;
  }

  header {
    padding: 0.8rem 1.5rem;
  }

  .nav-links {
    gap: 1.5rem;
  }
}

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

  .project-card img {
    height: auto;
    aspect-ratio: 16/9;
  }

  header {
    padding: 0.8rem 1.5rem;
  }

  .visit-btn {
    display: none;
  }

  #menu-icon {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fdfbf7;
    flex-direction: column;
    padding: 2rem;
    gap: 2rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

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

  .timeline::after {
    left: 31px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  .timeline-item:nth-child(even) {
    left: 0;
    text-align: left;
  }

  .timeline-item:nth-child(odd) {
    text-align: left;
  }

  .timeline-dot {
    left: 22px;
    right: auto;
  }

  .timeline-item:nth-child(even) .timeline-dot {
    left: 22px;
  }

  .article {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .article-info {
    align-items: center;
  }

  .tech-list img {
    width: 24px;
    height: 24px;
  }
}