/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Light Mode (White) */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #e5e5e5;
  --text-primary: #000000;
  --text-secondary: #333333;
  --text-tertiary: #666666;
  --border-color: #000000;
  --accent: #000000;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  /* Dark Mode (Black) */
  --bg-primary: #000000;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #e5e5e5;
  --text-tertiary: #b3b3b3;
  --border-color: #ffffff;
  --accent: #ffffff;
  --shadow: 0 4px 6px -1px rgba(255, 255, 255, 0.1),
    0 2px 4px -1px rgba(255, 255, 255, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(255, 255, 255, 0.1),
    0 4px 6px -2px rgba(255, 255, 255, 0.05);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--bg-primary);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: color 0.3s ease;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

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

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  width: 100%;
}

/* Social Links */
.nav-social-link {
  background: none;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary);
  text-decoration: none;
  padding: 0;
}

.nav-social-link:hover {
  background-color: var(--bg-secondary);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.nav-social-link svg {
  width: 20px;
  height: 20px;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary);
  padding: 0;
}

.theme-toggle:hover {
  background-color: var(--bg-secondary);
  transform: rotate(15deg);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sun-icon {
  display: block;
}

.moon-icon {
  display: none;
}

[data-theme="dark"] .sun-icon {
  display: none;
}

[data-theme="dark"] .moon-icon {
  display: block;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  background-color: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    var(--bg-secondary) 10px,
    var(--bg-secondary) 20px
  );
  opacity: 0.3;
  z-index: 0;
}

.hero-container {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  color: var(--text-primary);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  animation: fadeInUp 0.8s ease;
  color: var(--text-primary);
}

.highlight {
  color: var(--text-primary);
  border-bottom: 3px solid var(--accent);
  padding-bottom: 2px;
}

.highlight,
a.highlight {
  text-decoration: none;
  transition: all 0.3s ease;
}

a.highlight:hover {
  color: var(--accent);
  border-bottom-color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.btn {
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  border: 2px solid var(--border-color);
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background-color: var(--text-primary);
}

[data-theme="dark"] .btn-primary {
  background-color: var(--accent);
  color: var(--bg-primary);
}

[data-theme="dark"] .btn-primary:hover {
  background-color: var(--text-primary);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--accent);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInRight 0.8s ease;
}

.hero-image img {
  width: 100%;
  max-width: 400px;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 5px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  transition: all 0.3s ease;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  z-index: 10;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.scroll-indicator:hover {
  transform: translateX(-50%) translateY(-5px);
  animation: none;
}

@media (max-width: 768px) {
  .scroll-indicator {
    display: none;
  }
}

.scroll-indicator span {
  display: block;
  width: 30px;
  height: 50px;
  border: 2px solid var(--border-color);
  border-radius: 25px;
  position: relative;
}

.scroll-indicator span::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
  animation: scroll 2s infinite;
}

/* About Section */
.about {
  padding: 6rem 0;
  background-color: var(--bg-secondary);
  transition: background-color 0.3s ease;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
  width: 100%;
  transition: color 0.3s ease;
}

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

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-text {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

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

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

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

/* Projects Section */
.projects {
  padding: 6rem 0;
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.project-card {
  background-color: var(--bg-secondary);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 2px solid var(--border-color);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  overflow: visible;
  min-height: 0;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.project-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  font-size: 0.875rem;
  transition: color 0.3s ease;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  flex-grow: 0;
  flex-shrink: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.tech-tag {
  padding: 0.375rem 0.875rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.3s ease;
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.project-link-btn {
  padding: 0.625rem 1rem;
  background-color: var(--accent);
  color: var(--bg-primary);
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
  border: 2px solid var(--accent);
  font-size: 0.875rem;
  white-space: nowrap;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.project-link-btn:hover {
  background-color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Skills Section */
.skills {
  padding: 6rem 0;
  background-color: var(--bg-secondary);
  transition: background-color 0.3s ease;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.skill-item {
  background-color: var(--bg-primary);
  padding: 1.5rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 2px solid var(--border-color);
}

.skill-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.skill-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 0.75rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.skill-icon svg {
  width: 100%;
  height: 100%;
}

.skill-item h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.skill-item p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color 0.3s ease;
  line-height: 1.5;
}

/* Want to Learn Section */
.want-to-learn {
  padding: 6rem 0;
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease;
}

.want-to-learn .skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.section-subtitle {
  text-align: center;
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: -2rem auto 3rem;
  transition: color 0.3s ease;
}

.skill-item.learning {
  border: 2px dashed var(--border-color);
  opacity: 0.9;
  position: relative;
}

.skill-item.learning::before {
  content: "Learning";
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.skill-item.learning:hover {
  opacity: 1;
  border-style: solid;
  transform: translateY(-5px);
}

/* Contact Section */
.contact {
  padding: 6rem 0;
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease;
}

.contact-subtitle {
  text-align: center;
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 3rem;
  transition: color 0.3s ease;
}

.contact-content {
  max-width: 800px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  background-color: var(--bg-secondary);
  border-radius: 1rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  border: 2px solid var(--border-color);
}

.contact-item:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow);
  background-color: var(--bg-primary);
  border-color: var(--accent);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: var(--accent);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
}

.contact-details h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.contact-details p {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

/* Resume Page */
.resume-container {
  padding: 8rem 2rem 4rem;
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease;
  min-height: 100vh;
}

.resume-wrapper {
  max-width: 900px;
  margin: 0 auto;
  background-color: var(--bg-primary);
}

.resume-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
}

.resume-name {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.resume-title {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.resume-contact a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.resume-contact a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.resume-contact span {
  color: var(--text-tertiary);
}

.resume-section {
  margin-bottom: 3rem;
}

.resume-section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  transition: color 0.3s ease;
}

.resume-item {
  margin-bottom: 2rem;
}

.resume-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.resume-item-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.resume-item-date {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s ease;
}

.resume-item-company {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-style: italic;
  transition: color 0.3s ease;
}

.resume-item-tech {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.resume-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

.resume-list {
  list-style: none;
  padding-left: 0;
  margin-top: 0.75rem;
}

.resume-list li {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
  transition: color 0.3s ease;
}

.resume-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.resume-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  display: inline-block;
  margin-top: 0.5rem;
}

.resume-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

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

.resume-skill-category {
  padding: 1rem;
  background-color: var(--bg-secondary);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.resume-skill-category:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.resume-skill-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

@media print {
  .navbar,
  .footer,
  .nav-controls {
    display: none;
  }

  .resume-container {
    padding: 2rem 0;
  }

  .resume-wrapper {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .resume-name {
    font-size: 2rem;
  }

  .resume-item-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .resume-skills {
    grid-template-columns: 1fr;
  }

  .resume-contact {
    flex-direction: column;
    gap: 0.5rem;
  }

  .resume-contact span {
    display: none;
  }
}

/* Footer */
.footer {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.footer p {
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer-note {
  opacity: 0.7;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes scroll {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .projects-grid,
  .skills-grid,
  .want-to-learn .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--bg-primary);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
  }

  .nav-menu.active {
    left: 0;
  }

  .hamburger {
    display: flex;
  }

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

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

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

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

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

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

  .projects-grid,
  .skills-grid,
  .want-to-learn .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-item {
    flex-direction: column;
    text-align: center;
  }

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

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .nav-container {
    padding: 1rem;
  }

  .hero {
    padding: 6rem 1rem 4rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .about,
  .projects,
  .skills,
  .contact {
    padding: 4rem 0;
  }

  .projects-grid,
  .skills-grid,
  .want-to-learn .skills-grid {
    grid-template-columns: 1fr;
  }
}
