/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #121212;
  color: #FFFFFF;
  transition: all 0.3s ease;
}

body.light {
  background: #f5f5f5;
  color: #000000;
}

/* Header Section */
.header {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: #0a0a0a;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}

body.light .header {
  background: #e0e0e0;
}

.header-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #00FFE1;
  margin-right: 1rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.header-img:hover {
  box-shadow: 0 0 15px 3px #00FFE1, 0 0 30px 6px rgba(0, 255, 225, 0.5);
  transform: scale(1.05);
}

body.light .header-img {
  border: 2px solid #0077cc;
}

body.light .header-img:hover {
  box-shadow: 0 0 15px 3px #0077cc, 0 0 30px 6px rgba(0, 119, 204, 0.5);
}

.header-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #00FFE1;
}

body.light .header-title {
  color: #0077cc;
}

.theme-toggle, .glitch-toggle {
  position: absolute;
  top: 1rem;
  padding: 0.5rem 1rem;
  background: #00FFE1;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #000;
  font-weight: 600;
  transition: background 0.3s;
}

.theme-toggle {
  right: 4rem;
}

.glitch-toggle {
  right: 1rem;
}

.theme-toggle:hover, .glitch-toggle:hover {
  background: #00ccbb;
}

/* Navigation */
.nav {
  position: sticky;
  top: 96px;
  background: #1a1a1a;
  padding: 1rem;
  text-align: center;
  z-index: 998;
}

body.light .nav {
  background: #e0e0e0;
}

.nav a {
  color: #00FFE1;
  text-decoration: none;
  margin: 0 1rem;
  font-weight: 600;
  transition: color 0.3s;
}

body.light .nav a {
  color: #0077cc;
}

.nav a:hover {
  color: #fff;
}

body.light .nav a:hover {
  color: #000;
}

/* Main Content */
.main {
  min-height: calc(100vh - 200px);
  background: #121212;
  padding-top: 96px;
}

body.light .main {
  background: #f5f5f5;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Sections */
.section {
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #00FFE1;
}

body.light .section h2 {
  color: #0077cc;
}

/* Skills */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag {
  background: #1a1a1a;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

body.light .tag {
  background: #e0e0e0;
}

/* Projects */
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.project {
  background: #1a1a1a;
  padding: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.light .project {
  background: #e0e0e0;
}

.project:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px 5px #00FFE1, 0 0 40px 10px rgba(0, 255, 225, 0.5);
}

body.light .project:hover {
  box-shadow: 0 0 20px 5px #0077cc, 0 0 40px 10px rgba(0, 119, 204, 0.5);
}

.project h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.project p {
  font-size: 0.9rem;
  color: #aaa;
}

body.light .project p {
  color: #555;
}

/* Contact */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.contact-links a {
  color: #00FFE1;
  text-decoration: none;
  font-size: 1rem;
}

body.light .contact-links a {
  color: #0077cc;
}

.contact-links a i {
  margin-right: 0.5rem;
}

.contact-links a:hover {
  color: #fff;
}

body.light .contact-links a:hover {
  color: #000;
}

/* Ticker Footer */
.ticker-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #0a0a0a;
  padding: 0.5rem;
  z-index: 998;
}

body.light .ticker-footer {
  background: #e0e0e0;
}

.ticker-wrapper {
  overflow: hidden;
}

.ticker-scroll {
  display: flex;
  white-space: nowrap;
  animation: ticker 30s linear infinite reverse;
}

.ticker-scroll.glitch {
  animation: ticker 30s linear infinite reverse, glitch 2s infinite;
}

.ticker-scroll:hover {
  animation-play-state: paused;
}

.ticker-scroll span {
  margin-right: 2rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  cursor: pointer;
}

.coin.up {
  color: #00FF00;
  animation: flashGreen 0.5s ease;
}

.coin.down {
  color: #FF3333;
  animation: flashRed 0.5s ease;
}

.coin.neutral {
  color: #aaa;
}

body.light .coin.neutral {
  color: #555;
}

.error {
  color: #FF3333;
}

footer p {
  font-size: 0.9rem;
  color: #aaa;
  text-align: center;
  padding: 0.5rem 0;
}

body.light footer p {
  color: #555;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
}

.modal-content {
  background: #1a1a1a;
  margin: 15% auto;
  padding: 2rem;
  width: 80%;
  max-width: 500px;
  border-radius: 8px;
  position: relative;
  animation: fadeIn 0.3s ease-in;
}

body.light .modal-content {
  background: #fff;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #aaa;
}

body.light .close {
  color: #555;
}

.close:hover {
  color: #fff;
}

body.light .close:hover {
  color: #000;
}

.modal-content h3 {
  margin-bottom: 1rem;
}

.modal-content p {
  margin-bottom: 1rem;
  color: #aaa;
}

body.light .modal-content p {
  color: #555;
}

.modal-content a {
  color: #00FFE1;
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
}

body.light .modal-content a {
  color: #0077cc;
}

.modal-content a:hover {
  text-decoration: underline;
}

/* Animations */
@keyframes ticker {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(0); }
}

@keyframes flashGreen {
  0% { text-shadow: 0 0 10px #00FF00; }
  50% { text-shadow: 0 0 20px #00FF00; }
  100% { text-shadow: none; }
}

@keyframes flashRed {
  0% { text-shadow: 0 0 10px #FF3333; }
  50% { text-shadow: 0 0 20px #FF3333; }
  100% { text-shadow: none; }
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }

  .header-img {
    width: 60px;
    height: 60px;
  }

  .header-title {
    font-size: 1.2rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .projects-container {
    grid-template-columns: 1fr;
  }

  .nav a {
    margin: 0 0.5rem;
    font-size: 0.9rem;
  }

  .theme-toggle, .glitch-toggle {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  .ticker-scroll span {
    font-size: 0.8rem;
  }
}