/* Complete redesign with new color scheme and animations */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --text-primary: #e8e8e8;
  --text-secondary: #888888;
  --text-muted: #555555;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --border: rgba(255, 255, 255, 0.1);
  --grid-color: rgba(59, 130, 246, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Added animated grid background */
.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gridMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
  position: relative;
  z-index: 1;
}

/* New hero design with modern layout */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 120px;
  position: relative; /* Added from updates */
}

/* Added wrapper for top hero elements to allow absolute positioning of uptime */
.hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 40px; /* Moved from .status-bar */
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  /* margin-bottom: 40px; -- Removed as it moved to .hero-header */
  font-size: 14px;
  color: var(--text-secondary);
}

/* Redesigned uptime monitor with a polished coder aesthetic */
.uptime-monitor {
  background: rgba(26, 26, 26, 0.4);
  backdrop-filter: blur(8px);
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.3s ease;
}

.uptime-monitor:hover {
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.uptime-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  font-weight: 700;
}

.uptime-value {
  font-family: "Courier New", monospace;
  font-size: 18px;
  color: var(--text-primary);
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

.main-title {
  font-size: 64px;
  font-weight: 600;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.role {
  font-size: 24px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-weight: 400;
}

.bio {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.quick-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.quick-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 16px;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

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

/* New section styling */
.section {
  margin-bottom: 120px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-heading {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* About section with new card design */
.about-content {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.about-content p {
  margin-bottom: 24px;
}

.skills-section {
  margin-top: 48px;
}

.subsection-heading {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.skill-item {
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.3s ease;
}

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

.skill-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.skill-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

/* New project list design */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-item {
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.project-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  background: rgba(26, 26, 26, 0.8);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.project-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
}

.project-arrow {
  font-size: 24px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.project-item:hover .project-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

.project-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tech {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tech-tag {
  padding: 4px 12px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-light);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* New blog list styling */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.blog-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.blog-title {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
}

.blog-date {
  color: var(--text-muted);
  font-size: 14px;
  font-family: "Courier New", monospace;
}

/* New contact section design */
.contact-intro {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.7;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.contact-method {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-method:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-value {
  font-size: 15px;
  color: var(--accent-light);
}

/* Footer */
.footer {
  text-align: center;
  padding: 60px 0 40px;
  color: var(--text-muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

.footer p {
  margin: 4px 0;
}

/* Improved responsive design */
@media (max-width: 768px) {
  .main-title {
    font-size: 40px;
  }

  .role {
    font-size: 20px;
  }

  .bio {
    font-size: 16px;
  }

  .quick-links {
    gap: 16px;
  }

  .skill-grid {
    grid-template-columns: 1fr;
  }

  .contact-methods {
    grid-template-columns: 1fr;
  }

  .project-meta {
    flex-direction: row;
  }

  .blog-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .main-title {
    font-size: 32px;
  }

  .container {
    padding: 40px 20px;
  }

  .section {
    margin-bottom: 80px;
  }
}

/* Community Section Styles */
.community-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.community-card {
  display: flex;
  gap: 32px;
  padding: 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s ease;
  align-items: flex-start;
}

.community-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.community-logo {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.community-logo img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.community-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.community-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}

.community-role {
  font-size: 14px;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.community-description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Responsive Community Card */
@media (max-width: 768px) {
  .community-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding: 24px;
  }

  .community-logo {
    width: 80px;
    height: 80px;
  }

  .community-logo img {
    width: 60px;
    height: 60px;
  }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* ==================== PREMIUM CONTACT FORM STYLES ==================== */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(26, 26, 26, 0.4) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(20px);
  margin-bottom: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  animation: formFadeIn 0.8s ease-out;
  position: relative;
  overflow: hidden;
}

.contact-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.4), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: fieldSlideIn 0.6s ease-out backwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

@keyframes fieldSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.form-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(232, 232, 232, 0.7);
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-input,
.form-textarea {
  background: rgba(15, 15, 15, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  backdrop-filter: blur(10px);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(85, 85, 85, 0.8);
}

.form-input:hover,
.form-textarea:hover {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(15, 15, 15, 0.7);
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(15, 15, 15, 0.8);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1), 0 0 20px rgba(59, 130, 246, 0.2);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.form-error {
  font-size: 11px;
  color: #ff6b6b;
  min-height: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-error.show {
  opacity: 1;
}

.form-group.error .form-input,
.form-group.error .form-textarea {
  border-color: rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.05);
}

.form-group.error .form-input:focus,
.form-group.error .form-textarea:focus {
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.2), 0 0 20px rgba(255, 107, 107, 0.15);
}

.form-submit {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: var(--bg-primary);
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
  animation: buttonFadeIn 0.7s ease-out 0.5s backwards;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

@keyframes buttonFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.form-submit:hover::before {
  opacity: 1;
}

.form-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.form-submit:active {
  transform: translateY(-1px);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.submit-text {
  position: relative;
  z-index: 1;
}

.submit-arrow {
  position: relative;
  z-index: 1;
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-submit:hover .submit-arrow {
  transform: translateX(5px);
}

.form-status {
  min-height: 24px;
  font-size: 13px;
  text-align: center;
  opacity: 0;
  transition: all 0.4s ease;
  border-radius: 8px;
  padding: 8px 12px;
  background: transparent;
}

.form-status.success {
  opacity: 1;
  color: #51cf66;
  background: rgba(81, 207, 102, 0.1);
  border: 1px solid rgba(81, 207, 102, 0.2);
}

.form-status.error {
  opacity: 1;
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.2);
}

/* Contact Divider */
.contact-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 32px 0;
  position: relative;
}

.contact-divider::before {
  content: "OR";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-primary);
  padding: 0 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* Responsive Form Design */
@media (max-width: 768px) {
  .contact-form {
    padding: 20px;
    gap: 14px;
    border-radius: 10px;
  }

  .form-label {
    font-size: 10px;
  }

  .form-input,
  .form-textarea {
    font-size: 16px;
    padding: 10px 12px;
    border-radius: 8px;
  }

  .form-textarea {
    min-height: 90px;
  }

  .form-submit {
    padding: 9px 20px;
    font-size: 11px;
    gap: 6px;
  }

  .contact-divider {
    margin: 20px 0;
  }
}

@media (max-width: 480px) {
  .contact-form {
    padding: 16px;
    gap: 12px;
    border-radius: 10px;
    margin-bottom: 24px;
  }

  .form-label {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .form-input,
  .form-textarea {
    padding: 9px 11px;
    font-size: 16px;
    border-radius: 6px;
  }

  .form-textarea {
    min-height: 80px;
  }

  .form-submit {
    padding: 8px 16px;
    font-size: 10px;
  }

  .submit-arrow {
    display: none;
  }
}
