:root {
  --bg: #0f172a;
  --text: #e2e8f0;
  --primary: #3b82f6;
  --secondary: #10b981;
  --accent: #f472b6;
  --card-bg: #1e293b;
  --transition-speed: 0.5s;
}

.light-mode {
  --bg: #eff1f5;
  --text: #4c4f69;
  --primary: #ea76cb;
  --secondary: #ca8a04;
  --accent: #1e66f5;
  --card-bg: #e6e9ef;
}

*,
*::before,
*::after {
  transition:
    background-color var(--transition-speed) ease,
    border-color var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease,
    filter var(--transition-speed) ease;
}

.theme-toggle {
  position: relative;
  overflow: hidden;
}

.theme-toggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0;
  z-index: -1;
  transition:
    width 0.6s ease,
    height 0.6s ease,
    opacity 0.6s ease;
}

.theme-toggle.animating::before {
  width: 150px;
  height: 150px;
  opacity: 0.2;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

header {
  padding: 1.5rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  position: absolute;
  right: 1.5rem;
  z-index: 1001;
  width: 30px;
  height: 30px;
  justify-content: center;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background-color: var(--text);
  margin: 4px 0;
  transition: all 0.3s ease;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  font-size: 1rem;
}

nav a:hover,
nav a.active {
  color: var(--primary);
}

.hero {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 70px);
  padding: 0;
  margin-top: 70px;
  gap: 2rem;
}

.hero-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 2rem 0;
}

.hero-content {
  max-width: 600px;
}

h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.highlight {
  color: var(--primary);
}

.highlight2 {
  color: var(--accent);
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.8;
}

.cta-button {
  display: inline-block;
  background-color: var(--primary);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background-color: var(--accent);
  transform: translateY(-3px);
}

.hero-image img {
  width: 90%;
  height: 90%;
  object-fit: cover;
  border-radius: 50%;
}

.hero-image {
  width: 350px;
  height: 350px;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  transition: background 0.8s ease;
}

.hero-image::before,
.hero-image::after {
  display: none;
}

.hero-image.inverting {
  animation: invertGradient 1s ease;
}

@keyframes invertGradient {
  0% {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    transform: scale(1);
  }
  50% {
    background: linear-gradient(225deg, var(--primary), var(--accent));
    transform: scale(0.95);
  }
  100% {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    transform: scale(1);
  }
}

.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background-color: var(--accent);
}

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

.project-card {
  width: 100%;
  box-sizing: border-box;
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

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

.project-image {
  width: 100%;
  height: 200px;
  object-fit: scale-down;
  padding-top: 1rem;
}

.project-content {
  padding-bottom: 1.5rem;
  padding-top: 1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.project-description {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.project-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: var(--primary);
}

.participation-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.participation-item {
  background-color: var(--card-bg);
  padding: 1.5rem;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.participation-item:hover {
  transform: translateY(-5px);
}

.participation-year {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
}

.participation-event {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

footer {
  text-align: center;
  padding: 2rem 0;
  opacity: 0.7;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.fade-in.appear {
  opacity: 1;
  transform: translateY(0);
}

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

.skill-item {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-5px);
}

.skill-inner {
  position: relative;
  z-index: 2;
}

.skill-item span {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

.skill-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(0, 123, 255, 0.08);
  z-index: 1;
  transition: all 0.4s ease;
}

.skill-item:hover::before {
  left: 0;
}

.skill-item i[class^='devicon-'] {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  text-align: center;
}
.theme-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.toggle-icon {
  width: 24px;
  height: 24px;
}

.light-mode header {
  background-color: #fefae0;
}

.header-buttons {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.header-buttons img {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.header-buttons a:hover img {
  transform: translateY(-5px);
}

.theme-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: 15px;
}

.toggle-icon {
  width: 24px;
  height: 24px;
  color: var(--text);
  filter: var(--svg-filter);
}

.light-mode header {
  background-color: #eff1f5;
  backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.5s;
    z-index: 999;
  }

  nav.active {
    right: 0;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
  }

  .hamburger {
    display: flex;
    z-index: 1000;
  }

  .hamburger.active div:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

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

  .hamburger.active div:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .hero-wrapper {
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    order: 2;
    margin-top: 2rem;
  }

  .hero-image {
    order: 1;
    width: 250px;
    height: 250px;
    margin: 0 auto;
  }

  .section {
    padding: 3rem 0;
  }

  h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
  }
  .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .nav-right {
    display: flex;
    align-items: center;
}

  .theme-toggle {
    margin-left: 0;
    margin-right: 15px;
    position: relative;
    top: 0;
    right: 0;
  }

  .hamburger {
    position: relative;
    right: 0;
  }
}

.light-mode .header-buttons img {
  filter: brightness(0);
}

@media (max-width: 480px) {
  .project-card {
    margin-bottom: 1.5rem;
  }

  .participation-list {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 1rem;
  }

  .hero {
    padding-top: 4rem;
  }

  .hero-image {
    width: 200px;
    height: 200px;
  }
}

a {
  transition: all 0.3s ease;
  position: relative;
}

a:not(.cta-button):not(.project-link):hover {
  transform: translateY(-2px);
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

.logo {
  transition: all 0.3s ease;
}

.logo:hover {
  transform: scale(1.1) rotate(5deg);
  color: var(--accent);
}

.project-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-bottom: 3px solid transparent;
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-8px);
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.hero-content h1 {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-content h1:hover {
  transform: translateX(10px);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-content p {
  transition: all 0.4s ease;
}

.hero-content p:hover {
  transform: translateX(5px);
  color: var(--primary);
}

.highlight {
  position: relative;
  display: inline-block;
  color: var(--primary);
  transition: all 0.3s ease;
}

.highlight:hover {
  transform: scale(1.05);
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.highlight::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary);
  transition: width 0.4s ease;
}

.highlight:hover::after {
  width: 100%;
}
.participation-item {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-bottom: 3px solid transparent;
}

.participation-item:hover {
  transform: translateY(-8px);
  border-bottom: 3px solid var(--accent);
}

.skill-item {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.skill-item:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.skill-item:hover .skill-inner i {
  transform: scale(1.2);
}

.skill-inner i {
  transition: transform 0.3s ease;
}

.header-buttons img {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.header-buttons a:hover img {
  transform: translateY(-8px) scale(1.15);
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.2));
}

.hero-image {
  transition: all 0.5s ease;
  position: relative;
}

.hero-image::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 2px dashed transparent;
  border-radius: 50%;
  transition: all 0.5s ease;
  animation: none;
}

.hero-image:hover::before {
  display: block;
  border-color: var(--accent);
  animation: rotate 20s linear infinite;
}

.hero-image::after {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  border: 2px dashed transparent;
  border-radius: 50%;
  transition: all 0.5s ease;
  animation: none;
}

.hero-image:hover::after {
  display: block;
  border-color: var(--primary);
  animation: rotate 25s linear infinite reverse;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.cta-button {
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transition: all 0.4s ease;
  z-index: -1;
}

.cta-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.cta-button:hover::before {
  left: 0;
}

.hamburger {
  transition: all 0.3s ease;
}

.hamburger:hover div {
  background-color: var(--primary);
}

.theme-toggle {
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(15deg) scale(1.1);
}

.certificate-button-container {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}


.certificate-button-container .cta-button {
  background-color: var(--primary);
}

.certificate-button-container .cta-button:hover::before {
  background-color: var(--accent);
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding: 2.5rem 0;
  }

  .project-image {
    height: 160px;
  }

  nav {
    width: 80%;
  }

  .project-description,
  .participation-event {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .hamburger {
    right: 1rem;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 0 0.5rem;
  }

  .hero-image {
    width: 180px;
    height: 180px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .skill-item {
    padding: 1rem 0.5rem;
  }

  .skill-item i[class^='devicon-'] {
    font-size: 2rem;
  }

  .project-link {
    display: inline-block;
    padding: 0.5rem 0;
  }

  footer {
    padding: 1.5rem 0;
  }

  .certificate-button-container .cta-button {
    padding: 0.6rem 1.2rem;
  }

  .hero-image::before,
  .hero-image::after {
    display: none;
  }

  .header-buttons img {
    width: 35px;
    height: 35px;
  }

  .container {
    padding: 0 0.75rem;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .hero-image {
    width: 150px;
    height: 150px;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .skill-item span {
    font-size: 0.8rem;
  }
}

body {
  -webkit-overflow-scrolling: touch;
}

@media (hover: none) {
  .hero-content h1:hover,
  .hero-content p:hover {
    transform: none;
  }

  .cta-button,
  nav a,
  .project-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
.skill-level {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.skill-level-fill {
  width: var(--level);
  height: 100%;
  background-color: var(--primary);
  transition: width 0.6s ease;
  border-radius: 3px;
}

/* Featured Section */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.featured-item {
  background-color: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-bottom: 3px solid transparent;
}

.featured-item:hover {
  transform: translateY(-8px);
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.featured-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.featured-item:hover .featured-image img {
  transform: scale(1.05);
}

.featured-content {
  padding: 1.5rem;
}

.featured-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-weight: 600;
}

.featured-description {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  opacity: 0.8;
  line-height: 1.5;
}

.featured-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

.featured-source {
  color: var(--secondary);
  font-weight: 500;
}

.featured-date {
  color: var(--text);
}

.featured-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.featured-link:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.featured-link::after {
  content: '→';
  transition: transform 0.3s ease;
}

.featured-link:hover::after {
  transform: translateX(3px);
}
