/* 
  Modern Coded Portfolio Theme
  Style: Dark IDE / Cyberpunk / Clean
*/

:root {
  --bg-color: #030712;
  /* Rich Dark */
  --surface-color: #111827;
  /* Dark Gray */
  --text-primary: #e2e8f0;
  /* Light Gray */
  --text-secondary: #94a3b8;
  /* Muted Gray */
  --accent-color: #38bdf8;
  /* Sky Blue */
  --accent-secondary: #8b5cf6;
  /* Violet */
  --code-string: #34d399;
  /* Emerald */
  --code-keyword: #c084fc;
  /* Purple */
  --code-function: #60a5fa;
  /* Blue */
  --border-color: #1e293b;
  --glass-bg: rgba(17, 24, 39, 0.7);
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-height: 80px;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

ul {
  list-style: none;
}

/* Typography Utilities */
.mono-text {
  font-family: var(--font-mono);
}

.text-accent {
  color: var(--accent-color);
}

.text-muted {
  color: var(--text-secondary);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 100px 0;
}

/* Background Effects */
.background-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -2;
  pointer-events: none;
}

.blob {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
  z-index: -1;
  animation: float 20s infinite alternate;
}

.blob-1 {
  top: -100px;
  left: -100px;
  background-color: var(--accent-color);
}

.blob-2 {
  bottom: -100px;
  right: -100px;
  background-color: var(--accent-secondary);
  animation-delay: -5s;
}

@keyframes float {
  from {
    transform: translate(0, 0);
  }

  to {
    transform: translate(50px, 50px);
  }
}

/* Navbar */
.navbar {
  height: var(--nav-height);
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
}

.desktop-menu {
  display: flex;
  gap: 2rem;
}

.nav-item {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.nav-item:hover {
  color: var(--accent-color);
}

.nav-number {
  color: var(--accent-color);
  margin-right: 0.5rem;
}

.mobile-menu-button {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  right: -100%;
  width: 100%;
  height: calc(100vh - var(--nav-height));
  background: var(--surface-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  transition: 0.3s ease-in-out;
  z-index: 999;
}

.mobile-menu.active {
  right: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
}

.btn-outline:hover {
  background: rgba(56, 189, 248, 0.1);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-top: 1rem;
}

.hero-subtitle {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 2rem;
}

/* Terminal Window Component */
.terminal-window {
  background: #0f111a;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transform: perspective(1000px) rotateY(-5deg);
  transition: transform 0.3s ease;
}

.terminal-window:hover {
  transform: perspective(1000px) rotateY(0deg);
}

.terminal-header {
  background: #1a1d2d;
  padding: 10px 15px;
  display: flex;
  align-items: center;
}

.terminal-buttons {
  display: flex;
  gap: 8px;
}

.terminal-buttons span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.close {
  background: #ff5f56;
}

.minimize {
  background: #ffbd2e;
}

.maximize {
  background: #27c93f;
}

.terminal-title {
  flex-grow: 1;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.terminal-body {
  padding: 20px;
  font-size: 0.9rem;
  min-height: 300px;
}

.command-line {
  margin-bottom: 1rem;
  display: flex;
  gap: 10px;
}

.prompt {
  color: var(--accent-secondary);
  font-weight: bold;
}

.command {
  color: var(--text-primary);
}

.output {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  white-space: pre-wrap;
}

.code-output {
  color: #fff;
}

.keyword {
  color: var(--code-keyword);
}

.variable {
  color: var(--code-function);
}

.string {
  color: var(--code-string);
}

.property {
  color: var(--text-primary);
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  background-color: var(--text-secondary);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Section Headings */
.section-heading {
  display: flex;
  align-items: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.section-heading::after {
  content: "";
  display: block;
  height: 1px;
  width: 300px;
  background: var(--border-color);
  margin-left: 20px;
}

.heading-number {
  color: var(--accent-color);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  margin-right: 10px;
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 2rem;
}

.skills-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.skills-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

.about-image .image-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  display: block;
  border-radius: 8px;
  filter: grayscale(100%) contrast(1.1);
  transition: all 0.3s;
}

.about-image:hover img {
  filter: none;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid transparent;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.folder-icon {
  font-size: 2.5rem;
  color: var(--accent-color);
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-links a {
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.project-links a:hover {
  color: var(--accent-color);
}

.project-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.project-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Resume Tabs */
.jobs-tabs {
  display: flex;
  margin-top: 2rem;
}

.tab-list {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--border-color);
}

.tab-btn {
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  text-align: left;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all 0.2s;
  border-left: 2px solid transparent;
  margin-left: -2px;
}

.tab-btn:hover,
.tab-btn.active {
  background: rgba(56, 189, 248, 0.05);
  color: var(--accent-color);
}

.tab-btn.active {
  border-left-color: var(--accent-color);
}

.tab-content {
  padding: 0 2rem;
  flex-grow: 1;
}

.job-panel {
  display: none;
}

.job-panel.active {
  display: block;
  animation: fadeIn 0.4s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.job-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.job-range {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.job-details li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
}

.job-details li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

/* Contact Section (Original - kept for reference if needed, but overridden below) */
.contact-container {
  text-align: center;
  max-width: 600px;
}

.contact-title {
  font-size: 3rem;
  margin: 1rem 0;
  color: var(--text-primary);
}

.contact-desc {
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

/* Footer */
.footer {
  padding: 2rem 0;
  text-align: center;
  color: var(--text-secondary);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.social-links a {
  font-size: 1.2rem;
}

.social-links a:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}

.footer-credit {
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
  .desktop-menu {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

  .hero-container {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }

  /* Hide complicated visual on mobile or stack it */
  .hero-title {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 2rem;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-image {
    margin: 2rem auto;
    max-width: 300px;
  }

  .section-heading::after {
    width: 100px;
  }

  .jobs-tabs {
    flex-direction: column;
  }

  .tab-list {
    border-left: none;
    border-bottom: 2px solid var(--border-color);
    flex-direction: row;
    overflow-x: auto;
  }

  .tab-btn {
    border-left: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
  }

  .tab-btn.active {
    border-bottom-color: var(--accent-color);
    border-left-color: transparent;
  }

  .tab-content {
    padding: 2rem 0;
  }
}

/* --- Major Contact Section Overhaul --- */

.container.contact-container {
  max-width: 100%;
  padding: 0;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 900px) {
  .contact-row {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Visual Side */
.contact-visual {
  position: relative;
}

.code-card {
  background: #1e1e1e;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: rotate(-3deg);
  transition: transform 0.3s ease;
  position: relative;
  z-index: 2;
  border: 1px solid #333;
}

.code-card:hover {
  transform: rotate(0deg) scale(1.02);
}

.card-header {
  background: #252526;
  padding: 10px 15px;
  display: flex;
  gap: 8px;
}

.card-body {
  padding: 20px;
  color: #d4d4d4;
  font-size: 0.95rem;
  line-height: 1.6;
}

.indent-1 {
  padding-left: 20px;
}

.indent-2 {
  padding-left: 40px;
}

.keyword {
  color: #569cd6;
}

/* Blue */
.variable {
  color: #9cdcfe;
}

/* Light Blue */
.string {
  color: #ce9178;
}

/* Orange/Red */
.function {
  color: #dcdcaa;
}

/* Pale Yellow */
.comment {
  color: #6a9955;
}

/* Green */

.glow-effect {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
  pointer-events: none;
  z-index: -1;
}

.contact-info-text {
  margin-top: 2rem;
  text-align: left;
}

.contact-title {
  font-size: 2.5rem;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.contact-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.social-connect {
  display: flex;
  gap: 1.5rem;
}

.social-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-icon:hover {
  background: var(--accent-color);
  color: #000;
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
}

/* Modern Form Side */
.contact-form-wrapper {
  perspective: 1000px;
}

.contact-form-modern {
  background: rgba(20, 20, 30, 0.8);
  padding: 40px;
  border-radius: 20px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

/* Neon Top Border */
.contact-form-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-color), var(--accent-secondary), transparent);
  animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.form-header h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

/* Floating Label Inputs */
.input-group {
  position: relative;
  margin-bottom: 2rem;
}

.modern-input {
  width: 100%;
  padding: 15px 10px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-mono);
  transition: all 0.3s;
}

.modern-input:focus {
  outline: none;
  border-bottom-color: var(--accent-color);
}

.floating-label {
  position: absolute;
  top: 15px;
  left: 10px;
  color: var(--text-secondary);
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.3s ease;
  font-family: var(--font-mono);
}

.modern-input:focus~.floating-label,
.modern-input:not(:placeholder-shown)~.floating-label {
  top: -10px;
  left: 0;
  font-size: 0.8rem;
  color: var(--accent-color);
}

.input-border {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.modern-input:focus~.input-border {
  width: 100%;
}

/* Glitch Button */
.cyber-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(45deg, var(--accent-color), var(--accent-secondary));
  border: none;
  border-radius: 4px;
  color: white;
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(56, 189, 248, 0.3);
}

.cyber-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

.btn-content {
  position: relative;
  z-index: 1;
}

/* Remove old style overrides */
.contact-form-styled {
  display: none;
}

/* Hide old one just in case */

textarea.modern-input {
  resize: vertical;
  min-height: 100px;
}

/* --- Cyberpunk Toast Notification --- */
.cyber-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: rgba(10, 15, 25, 0.95);
  border: 1px solid var(--code-string);
  border-left: 4px solid var(--code-string);
  padding: 15px 20px;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  width: 350px;
  z-index: 2000;
  transform: translateX(120%);
  /* Hidden off-screen */
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.cyber-toast.show {
  transform: translateX(0);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.toast-icon {
  font-size: 1.5rem;
  color: var(--code-string);
}

.toast-message {
  display: flex;
  flex-direction: column;
}

.toast-title {
  font-family: var(--font-mono);
  color: var(--code-string);
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.toast-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Progress bar for timer */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--code-string);
  width: 0%;
  transition: width linear;
}

.cyber-toast.show .toast-progress {
  width: 100%;
}