:root {
  --bg: #0a0a0a;
  --text: #f5f5f5;
  --accent: #fa00af;
  --card-bg: #151515;
}

[data-theme="light"] {
  --bg: #fafafa;
  --text: #111;
  --accent: #c30082;
  --card-bg: #fff;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  margin: 0;
  overflow-x: hidden;
}

/* HEADER */
.header {
  position: relative;
  width: 100%;
  height: 80px;
  overflow: hidden;
}
.header-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4);
  z-index: -1;
}
.header-overlay {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0 8%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}
.logo {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}
.logo .dot {
  color: var(--accent);
}

/* Theme Toggle */
.theme-toggle {
  background: var(--accent);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 0 12px var(--accent);
}
.theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
  background: #fff;
  color: var(--accent);
}

/* Intro Section */
.projects-intro {
  text-align: center;
  padding: 4rem 10%;
}
.projects-intro h1 {
  font-size: 2.2rem;
  color: var(--text);
}
.projects-intro i {
  color: var(--accent);
}
.projects-intro p {
  color: var(--text);
  opacity: 0.8;
  margin-top: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  padding: 0 10% 4rem;
}

/* Mac Frame */
.mac-frame {
  position: relative;
  background: var(--card-bg);
  border-radius: 1.2rem;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(0,0,0,0.3);
  transition: all 0.5s ease;
  text-align: center;
}
.mac-frame:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 35px rgba(250, 0, 175, 0.25);
}

.mac-top {
  position: relative;
  height: 25px;
  background: #222;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}
.mac-camera {
  width: 10px;
  height: 10px;
  background: #111;
  border-radius: 50%;
  margin: 0 auto;
  position: relative;
  top: 7px;
}
.mac-light {
  width: 4px;
  height: 4px;
  background: #333;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-6px);
  transition: background 0.4s;
}
.mac-light.active {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.mac-screen {
  height: 220px;
  background: #000;
  overflow: hidden;
  border: 2px solid #111;
  border-radius: 0 0 1rem 1rem;
}
.mac-screen iframe {
  width: 100%;
  height: 100%;
  border: none;
  opacity: 0;
  transition: opacity 1s ease;
}
.mac-frame:hover iframe {
  opacity: 1;
}

.mac-bottom {
  height: 15px;
  background: #111;
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
}

.mac-frame h3 {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--text);
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
  .projects-intro {
    padding: 2rem 1.5rem;
  }
  .projects-grid {
    padding: 0 1.5rem 3rem;
  }
}
/* Overlay for description and skills */
.mac-screen {
  position: relative;
  height: 220px;
  background: #000;
  overflow: hidden;
  border: 2px solid #111;
  border-radius: 0 0 1rem 1rem;
}

.mac-screen iframe {
  width: 100%;
  height: 100%;
  border: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.mac-screen:hover iframe {
  opacity: 1;
}

/* Overlay */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10,10,10,0.85);
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.5s ease;
  text-align: center;
}

.mac-screen:hover .overlay {
  opacity: 1;
}

/* Typewriter animation */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--accent);
  white-space: nowrap;
  animation: typing 3s steps(40, end), blink-caret 0.7s step-end infinite;
  font-size: 0.9rem;
  margin-bottom: 0.7rem;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes blink-caret {
  0%, 100% { border-color: transparent; }
  50% { border-color: var(--accent); }
}

/* Skill icons */
.skills {
  margin: 0.5rem 0;
}
.skills i {
  font-size: 1.2rem;
  color: var(--accent);
  margin: 0 0.4rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* View project button */
.btn-view {
  margin-top: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}
.btn-view:hover {
  background: #fff;
  color: var(--accent);
  transform: scale(1.05);
}
.view-projects {
  text-align: center;
  padding: 3rem 10%;
  margin-top: 3rem;
  background: var(--card-bg);
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(250, 0, 175, 0.15);
}

.view-projects h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.view-projects p {
  color: var(--text);
  margin-bottom: 1.5rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.project-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  color: var(--accent);
  padding: 0.6rem 1rem;
  border-radius: 0.6rem;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.project-btn i {
  font-size: 1rem;
  animation: bounce 2s infinite;
}

.project-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px) scale(1.05);
}
