:root {
  --green: #53d9d1;
  --pink: #f27b9b;
  --orange: #eb7132;
}

/* Restore original background styles and remove CSS Doodle */

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 50%, #a8caba 100%);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

.network-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: none;
}

#networkCanvas {
  width: 100vw;
  height: 100vh;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

main, .navbar, .section, footer {
  position: relative;
  z-index: 1;
}

/* Light mode specific adjustments */
body:not(.dark-mode) {
  color: #2c3e50;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%);
}

body:not(.dark-mode) .section {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body:not(.dark-mode) .navbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .navbar a {
  color: #2c3e50;
}

body:not(.dark-mode) .navbar a:hover {
  color: #0077ff;
}

body:not(.dark-mode) footer {
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .exp-item {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .exp-item:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

body:not(.dark-mode) .exp-title {
  color: #2c3e50;
}

body:not(.dark-mode) .exp-description p {
  color: #555;
}

body:not(.dark-mode) .exp-logo {
  filter: brightness(1.1) contrast(1.1);
}

body:not(.dark-mode) .project-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .project-card:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

body:not(.dark-mode) .project-img {
  filter: brightness(1.05) contrast(1.05);
}

body:not(.dark-mode) .skill {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .skill:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .skill img {
  filter: brightness(1.1) contrast(1.1);
}

body:not(.dark-mode) .social-icon {
  color: #2c3e50;
}

body:not(.dark-mode) .social-icon:hover {
  color: #0077ff;
}

body:not(.dark-mode) .social-img {
  filter: brightness(1.1) contrast(1.1);
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  body {
    color: #e0e0e0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  }
}

body.dark-mode {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  color: #f1f1f1;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.navbar ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
  align-items: center;
}

.navbar a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.navbar a:hover {
  color: #0077ff;
}

.navbar a.active {
  color: #0077ff;
}

/* Dark mode navbar */
@media (prefers-color-scheme: dark) {
  .navbar {
    background: rgba(26, 26, 46, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .navbar a {
    color: #f1f1f1;
  }
  
  .navbar a:hover {
    color: #00bfff;
  }
}

body.dark-mode .navbar {
  background: rgba(26, 26, 46, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .navbar a {
  color: #f1f1f1;
}

body.dark-mode .navbar a:hover {
  color: #00bfff;
}

#theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

#theme-toggle:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

body.dark-mode #theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

main {
  padding: 100px 2rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 3.5rem; /* Increased from 2rem */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.section:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

/* Dark mode sections */
@media (prefers-color-scheme: dark) {
  .section {
    background: rgba(35, 39, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

body.dark-mode .section {
  background: rgba(35, 39, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .section:hover {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  text-align: center;
  padding: 1rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Dark mode footer */
@media (prefers-color-scheme: dark) {
  footer {
    background: rgba(26, 26, 46, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

body.dark-mode footer {
  background: rgba(26, 26, 46, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

h1, h2 {
  margin-top: 0;
}

@media (max-width: 600px) {
  .navbar ul {
    flex-direction: column;
    gap: 1rem;
  }
  main {
    padding: 0 0.5rem;
  }
  .section {
    padding: 1rem;
  }
}

.socials {
  display: flex;
  gap: 1.2rem;
  margin-top: 1.2rem;
  align-items: center;
}
.social-icon {
  font-size: 2rem;
  text-decoration: none;
  color: #222;
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
}
.social-icon:hover {
  color: #0077ff;
  transform: scale(1.15) rotate(-8deg);
}
body.dark-mode .social-icon {
  color: #f1f1f1;
}
body.dark-mode .social-icon:hover {
  color: #00bfff;
}

.social-img {
  width: 28px;
  height: 28px;
  display: block;
  margin: 0;
  padding: 0;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem; /* Increased from 1rem */
  justify-content: center;
}
.skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.skill img {
  width: 48px;
  height: 48px;
  margin-bottom: 0.5rem;
}
.skill span {
  font-size: 1rem;
  margin-top: 0.2rem;
  text-align: center;
}

.exp-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem; /* Increased from 2rem */
}
.exp-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: rgba(247, 248, 250, 0.8);
  backdrop-filter: blur(5px);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.exp-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  background: rgba(247, 248, 250, 0.9);
}
.exp-item.expanded {
  background: rgba(240, 244, 255, 0.9);
  backdrop-filter: blur(10px);
}
.exp-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-right: 10px;
  vertical-align: middle;
  flex-shrink: 0;
}
.exp-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.exp-title {
  display: block;
  font-size: 1.08rem;
  font-weight: 500;
  color: #222;
}
.exp-date {
  color: #888;
  font-size: 0.98rem;
  font-weight: 400;
}
.exp-description {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
  opacity: 0;
  margin-top: 0;
}
.exp-item.expanded .exp-description {
  max-height: 200px;
  opacity: 1;
  margin-top: 1rem;
}
.exp-description p {
  margin: 0;
  line-height: 1.6;
  color: #666;
  font-size: 0.95rem;
}
body.dark-mode .exp-item {
  background: rgba(35, 39, 42, 0.8);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
body.dark-mode .exp-item:hover {
  background: rgba(35, 39, 42, 0.9);
}
body.dark-mode .exp-item.expanded {
  background: rgba(42, 47, 53, 0.9);
  backdrop-filter: blur(10px);
}
body.dark-mode .exp-title {
  color: #f1f1f1;
}
body.dark-mode .exp-description p {
  color: #ccc;
}
body.dark-mode .exp-logo {
  background: #181a1b;
}

/* Network background animation */
.network-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 50%, #a8caba 100%);
  transition: background 0.3s ease;
}

#networkCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Dark mode network background */
@media (prefers-color-scheme: dark) {
  .network-bg {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  }
}

body.dark-mode .network-bg {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
}

/* Projects grid triangle layout */
.projects-grid {
  display: flex;
  gap: 2.5rem; /* Increased from 2rem */
  flex-wrap: wrap;
  justify-content: center;
}
.projects-grid .project-card:nth-child(3) {
  grid-column: 1 / span 2;
  justify-self: center;
}
.project-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 220px;
  height: 220px;
  background: rgba(255,255,255,0.95);
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
  position: relative;
}
.project-card:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.project-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  transition: transform 0.3s ease;
}
.project-title {
  padding: 1rem;
  font-weight: 600;
  color: #333;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0 0 8px 8px;
  transition: background 0.3s ease;
}

/* Dark mode for project cards */
body.dark-mode .project-card {
  background: rgba(35, 39, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
body.dark-mode .project-card:hover {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}
body.dark-mode .project-img {
  filter: brightness(0.9);
}

@media (max-width: 700px) {
  .projects-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 1.2rem;
  }
  .projects-grid .project-card:nth-child(3) {
    grid-column: 1;
  }
  .project-card {
    width: 90vw;
    max-width: 320px;
    height: 200px;
  }
  .project-img {
    height: 90px;
  }
}

/* News Feed Styles */
.news-feed-container {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.news-feed {
  margin: 1rem 0;
}

.loading-news {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

.news-article {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.news-article:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 1);
}

.news-article-image {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.news-article-content {
  flex: 1;
}

.news-article-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  line-height: 1.4;
}

.news-article-description {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.news-article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #888;
}

.news-article-source {
  font-weight: 500;
  color: #0077ff;
}

.news-article-time {
  color: #999;
}

.news-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.refresh-btn {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #0077ff, #00bfff);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.refresh-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(0, 119, 255, 0.3);
}

.news-category {
  padding: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  background: white;
  font-size: 0.9rem;
}

.api-status-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.api-options {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(240, 248, 255, 0.8);
  border-radius: 6px;
  border-left: 4px solid #0077ff;
}

.api-options h4 {
  margin: 0 0 0.5rem 0;
  color: #0077ff;
}

.api-options ul {
  margin: 0;
  padding-left: 1.5rem;
}

.api-options li {
  margin: 0.3rem 0;
  color: #555;
}

/* Dark mode for news feed */
@media (prefers-color-scheme: dark) {
  .news-feed-container,
  .api-status-section {
    background: rgba(35, 39, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .news-article {
    background: rgba(35, 39, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .news-article:hover {
    background: rgba(35, 39, 42, 1);
  }
  
  .news-article-title {
    color: #f1f1f1;
  }
  
  .news-article-description {
    color: #ccc;
  }
  
  .news-article-source {
    color: #00bfff;
  }
  
  .news-category {
    background: rgba(35, 39, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f1f1f1;
  }
  
  .api-options {
    background: rgba(0, 119, 255, 0.1);
    border-left-color: #00bfff;
  }
  
  .api-options li {
    color: #ccc;
  }
}

body.dark-mode .news-feed-container,
body.dark-mode .api-status-section {
  background: rgba(35, 39, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .news-article {
  background: rgba(35, 39, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .news-article:hover {
  background: rgba(35, 39, 42, 1);
}

body.dark-mode .news-article-title {
  color: #f1f1f1;
}

body.dark-mode .news-article-description {
  color: #ccc;
}

body.dark-mode .news-article-source {
  color: #00bfff;
}

body.dark-mode .news-category {
  background: rgba(35, 39, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f1f1;
}

body.dark-mode .api-options {
  background: rgba(0, 119, 255, 0.1);
  border-left-color: #00bfff;
}

body.dark-mode .api-options li {
  color: #ccc;
}

/* Dark mode email styling */
body.dark-mode a[href^="mailto:"] {
  color: #ffffff;
}

body.dark-mode a[href^="mailto:"]:hover {
  color: #00bfff;
} 