/* CSS Variables for Theme */
:root {
  --gold: #d4af37;
  --gold-light: #f4e5c2;
  --gold-dark: #996515;
  --black: #000000;
  --black-light: #1a1a1a;
  --black-lighter: #2a2a2a;
  --white: #ffffff;
  --gray: #e5e5e5;
  --transition: all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
  --box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  --border-radius: 8px;
  --section-padding: 100px 0;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #e5e5e5;
  --text-primary: #000000;
  --text-secondary: #333333;
  --text-tertiary: #666666;
  --border-color: #dddddd;
  --hero-bg: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9));
}

[data-theme="dark"] {
  --bg-primary: #000000;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #e5e5e5;
  --text-tertiary: #cccccc;
  --border-color: #333333;
  --hero-bg: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8));
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

a {
  text-decoration: none;
  color: var(--text-secondary);
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: var(--section-padding);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.section-title span {
  color: var(--gold);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--gold);
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--gold-light);
  font-weight: 300;
  letter-spacing: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 35px;
  background: var(--gold);
  color: var(--black);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gold-dark);
  transition: var(--transition);
  z-index: -1;
}

.btn:hover {
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

.btn:hover::before {
  left: 0;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}

.btn-outline::before {
  background: var(--gold);
}

.btn-outline:hover {
  color: var(--black);
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 90px;
  z-index: 1001;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.theme-toggle:hover {
  transform: rotate(30deg);
}

.theme-toggle i {
  font-size: 1.2rem;
  color: var(--gold);
}

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-primary);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header.scrolled {
  background: var(--bg-primary);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 0;
}

.logo a {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: "Playfair Display", serif;
  letter-spacing: 1px;
}

.logo a span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links li {
  margin-left: 40px;
}

.nav-links a {
  font-size: 1rem;
  font-weight: 500;
  position: relative;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--gold);
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger .line {
  width: 30px;
  height: 2px;
  background: var(--gold);
  margin: 6px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  height: 100vh;
  min-height: 800px;
  display: flex;
  align-items: center;
  background: var(--hero-bg), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Crect width='100' height='100' fill='%231a1a1a'/%3E%3C/svg%3E");
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.pre-title {
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 300;
}

.hero h1 {
  font-size: 4.5rem;
  color: var(--text-primary);
  margin-bottom: 15px;
  line-height: 1.1;
}

.hero h1 span {
  color: var(--gold);
}

.hero-intro {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--text-secondary);
}

.rotating-skills {
  height: 60px;
  overflow: hidden;
  margin-bottom: 30px;
  position: relative;
}

.skills-list {
  list-style: none;
  animation: rotateSkills 9s infinite;
}

.skills-list li {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--gold);
  height: 60px;
  display: flex;
  align-items: center;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 500px;
  color: var(--text-secondary);
}

.hero-btns {
  display: flex;
  margin-bottom: 50px;
  gap: 15px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.image-wrapper {
  position: relative;
  width: 400px;
  height: 400px;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 10px solid rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.gold-border {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  animation: rotate 20s linear infinite;
}

.gold-dots {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.gold-dots span {
  position: absolute;
  width: 15px;
  height: 15px;
  background: var(--gold);
  border-radius: 50%;
}

.gold-dots span:nth-child(1) {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.gold-dots span:nth-child(2) {
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.gold-dots span:nth-child(3) {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.gold-dots span:nth-child(4) {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.social-links {
  display: flex;
}

.social-links a {
  width: 45px;
  height: 45px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: var(--gold);
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--gold);
  color: var(--black);
  transform: translateY(-3px);
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-down a {
  width: 50px;
  height: 50px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.2rem;
  animation: bounce 2s infinite;
}

/* About Section */
.about-content {
  display: flex;
  align-items: center;
  gap: 60px;
}

.about-image {
  flex: 1;
}

.about-img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.about-text p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.about-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 30px 0;
}

.info-item span {
  display: block;
  color: var(--gold);
  margin-bottom: 5px;
  font-weight: 500;
}

.info-item p {
  font-size: 1rem;
  margin: 0;
  color: var(--text-secondary);
}

.about-btns {
  display: flex;
  margin-top: 30px;
}

/* Skills Section - Updated for 4 per row */
.skills-content {
  display: flex;
  gap: 60px;
  flex-direction: column;
}

.skills-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.skills-description h3 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.skills-description p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.skill-card {
  background: var(--bg-secondary);
  padding: 30px 25px;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
  border-top: 3px solid var(--gold);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.skill-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(212, 175, 55, 0.2);
}

.skill-icon {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 15px;
}

.skill-card h4 {
  font-size: 1.2rem;
  margin-bottom: 0;
  color: var(--text-primary);
}

/* Projects Section - Pinterest Style */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.project-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease;
  background: var(--bg-secondary);
  opacity: 0;
  transform: translateY(50px);
  animation: fallIn 0.8s ease-out forwards;
}

.project-item:nth-child(1) { animation-delay: 0.1s; }
.project-item:nth-child(2) { animation-delay: 0.2s; }
.project-item:nth-child(3) { animation-delay: 0.3s; }
.project-item:nth-child(4) { animation-delay: 0.4s; }
.project-item:nth-child(5) { animation-delay: 0.5s; }
.project-item:nth-child(6) { animation-delay: 0.6s; }

.project-item:hover {
  transform: translateY(-10px);
}

.project-link {
  display: block;
  width: 100%;
  height: 100%;
}

.project-img {
  position: relative;
  overflow: hidden;
  height: 100%;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-item:hover .project-img img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.project-item:hover .project-overlay {
  opacity: 1;
}

.project-content {
  text-align: center;
  padding: 20px;
  transform: translateY(20px);
  transition: var(--transition);
}

.project-item:hover .project-content {
  transform: translateY(0);
}

.project-content h3 {
  color: var(--white);
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.project-content p {
  color: var(--gold-light);
  margin-bottom: 20px;
}

.project-tech {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tech span {
  background: var(--gold);
  color: var(--black);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.view-more {
  text-align: center;
  margin-top: 50px;
}

/* Footer */
footer {
  background: var(--bg-secondary);
  padding: 60px 0 30px;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gold);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo {
  margin-bottom: 30px;
}

.footer-logo a {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: "Playfair Display", serif;
  letter-spacing: 1px;
}

.footer-logo a span {
  color: var(--gold);
}

.footer-links {
  margin-bottom: 30px;
}

.footer-links ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links li {
  margin: 0 15px;
}

.footer-links a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-social {
  display: flex;
  margin-bottom: 30px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px;
  color: var(--gold);
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--gold);
  color: var(--black);
  transform: translateY(-3px);
}

.footer-copyright {
  text-align: center;
}

.footer-copyright p {
  margin: 0;
  color: var(--text-secondary);
}

/* Animations */
@keyframes rotate {
  0% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(360deg);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
      transform: translateY(0) translateX(-50%);
  }
  40% {
      transform: translateY(-10px) translateX(-50%);
  }
  60% {
      transform: translateY(-5px) translateX(-50%);
  }
}

@keyframes fallIn {
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* New Animation for Rotating Skills */
@keyframes rotateSkills {
  0%, 20% {
      transform: translateY(0);
  }
  25%, 45% {
      transform: translateY(-60px);
  }
  50%, 70% {
      transform: translateY(-120px);
  }
  75%, 95% {
      transform: translateY(-180px);
  }
  100% {
      transform: translateY(-240px);
  }
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .skills-grid {
      grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .hero .container {
      flex-direction: column;
      text-align: center;
  }

  .hero-content {
      margin-bottom: 50px;
  }

  .hero-btns {
      flex-direction: column;
      align-items: center;
  }

  .about-content {
      flex-direction: column;
  }

  .projects-grid {
      grid-template-columns: repeat(2, 1fr);
  }

  .skills-grid {
      grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
      position: fixed;
      top: 0;
      right: -100%;
      width: 70%;
      height: 100vh;
      background: var(--bg-secondary);
      flex-direction: column;
      align-items: center;
      justify-content: center;
      transition: var(--transition);
      z-index: 999;
  }

  .nav-links.active {
      right: 0;
  }

  .nav-links li {
      margin: 15px 0;
  }

  .hamburger {
      display: block;
      z-index: 1000;
  }

  .hamburger.active .line:nth-child(1) {
      transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active .line:nth-child(2) {
      opacity: 0;
  }

  .hamburger.active .line:nth-child(3) {
      transform: rotate(-45deg) translate(7px, -6px);
  }

  .section-title {
      font-size: 2.5rem;
  }

  .hero h1 {
      font-size: 3.5rem;
  }

  .hero-intro {
      font-size: 1.5rem;
  }
  
  .skills-list li {
      font-size: 1.5rem;
  }

  .projects-grid {
      grid-template-columns: 1fr;
  }

  .about-info {
      grid-template-columns: 1fr;
  }

  .image-wrapper {
      width: 300px;
      height: 300px;
  }

  .theme-toggle {
      right: 80px;
  }

  .skills-grid {
      grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero {
      padding-top: 100px;
      min-height: 700px;
  }
  
  .hero h1 {
      font-size: 2.8rem;
  }
  
  .hero-intro {
      font-size: 1.3rem;
  }
  
  .skills-list li {
      font-size: 1.3rem;
  }
  
  .rotating-skills {
      height: 50px;
  }
  
  .skills-list li {
      height: 50px;
  }
}