/* Base Styles */
:root {
  --primary-color: #4a6cf7;
  --secondary-color: #6c757d;
  --dark-color: #212529;
  --light-color: #f8f9fa;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --body-color: #f5f8ff;
  --text-color: #333;
  --border-color: #e9ecef;
  --transition: all 0.3s ease;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --container-width-lg: 80%;
  --container-width-md: 90%;
  --card-bg: white;
  --terminal-bg: #1e1e1e;
  --terminal-header-bg: #333;
}

[data-theme="dark"] {
  --primary-color: #4a6cf7;
  --secondary-color: #adb5bd;
  --dark-color: #212529;
  --light-color: #f8f9fa;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --body-color: #121212;
  --text-color: #f0f0f0;
  --border-color: #2a2a2a;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  --card-bg: #1e1e1e;
  --terminal-bg: #121212;
  --terminal-header-bg: #1c1c1c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--body-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  width: 85%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

section {
  padding: 6rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
  font-size: 2.5rem;
  position: relative;
  color: var(--text-color);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

h1,
h2,
h3,
h4,
h5 {
  line-height: 1.2;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn.primary {
  background: var(--primary-color);
  color: white;
}

.btn.secondary {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn.small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.btn.primary:hover {
  background: #3a5ce5;
}

.btn.secondary:hover {
  background: rgba(74, 108, 247, 0.1);
}

.highlight {
  color: var(--primary-color);
}

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--body-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

header.scrolled {
  background: var(--card-bg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 5rem;
  padding: 0 1rem;
}

/* Logo container styles */
.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 300px;
}

.logo {
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  flex-shrink: 0;
}

.logo-name h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Navigation links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  font-size: 1rem;
  text-decoration: none;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text-color);
  margin: 5px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {

  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  overflow: hidden;
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.hero-content {
  flex: 1;
  min-width: 300px;
  max-width: 600px;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-content h2 {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

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

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(74, 108, 247, 0.1);
  color: var(--primary-color);
  transition: var(--transition);
}

.social-links.large a {
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
}

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

.hero-image {
  flex: 1;
  max-width: 500px;
  min-width: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-image {
  max-width: 83%;
  height: auto;
  border-radius: 50%;
  border: 5px solid white;
  box-shadow: var(--shadow);
}

/* Terminal preview in hero section */
.terminal-preview {
  margin-top: 2rem;
  width: 100%;
  max-width: 500px;
  background-color: var(--terminal-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  font-family: 'Courier New', monospace;
}

.terminal-body-preview {
  padding: 15px;
  color: #fff;
  height: 150px;
  overflow: hidden;
}

.terminal-body-preview p {
  margin: 8px 0;
  line-height: 1.3;
  font-size: 14px;
}

/* Cursor animation */
@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.terminal-body-preview p:last-child .command::after {
  content: '|';
  animation: blink 1s infinite;
  font-weight: normal;
}

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

.about-text p {
  margin-bottom: 1.5rem;
}

.about-text h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.skill-category h4 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags span {
  background: rgba(74, 108, 247, 0.1);
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

.about-image img {
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* Projects Section */
.project-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.project-links {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.filter-btn {
  background: #f8f9fa;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary-color);
  color: white;
}

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

.project-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-image img {
  transition: var(--transition);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

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

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tags span {
  background: rgba(74, 108, 247, 0.1);
  color: var(--primary-color);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.8rem;
}

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

.achievement-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.achievement-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.achievement-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.achievement-card h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.achievement-card p {
  color: var(--secondary-color);
}

/* Resume Section */
.resume-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
}

.resume-download {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.resume-download p {
  margin-bottom: 2rem;
}

.resume-section {
  margin-bottom: 3rem;
}

.resume-section h3 {
  margin-bottom: 2rem;
  font-size: 1.8rem;
  color: var(--primary-color);
}

.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 2px;
  background: var(--primary-color);
}

.timeline-item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 2.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
}

.timeline-date {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.timeline-content {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.timeline-content h4 {
  margin-bottom: 0.3rem;
  font-size: 1.2rem;
}

.timeline-content h5 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-weight: 500;
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.contact-item i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-item h3 {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.contact-item p {
  color: var(--text-color);
}

.contact-form {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
}

/* Contact form status message */
#status-message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 5px;
  text-align: center;
  display: none;
}

#status-message.success {
  display: block;
  background-color: rgba(40, 167, 69, 0.2);
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

#status-message.error {
  display: block;
  background-color: rgba(220, 53, 69, 0.2);
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
}

/* Form loading state */
.form-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.form-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border: 3px solid rgba(74, 108, 247, 0.3);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: formLoading 1s infinite linear;
}

@keyframes formLoading {
  to {
    transform: rotate(360deg);
  }
}

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

/* Media Queries */
@media screen and (min-width: 1301px) {
  .container {
    width: 80%;
  }

  .nav-links {
    gap: 2rem;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .hero-content h1 {
    font-size: 3.5rem;
  }
}

@media screen and (min-width: 769px) and (max-width: 1300px) {
  .container {
    width: 90%;
  }

  nav {
    padding: 0 1rem;
  }

  .logo-container {
    gap: 8px;
    max-width: 200px;
  }

  .logo {
    width: 35px;
    height: 35px;
    font-size: 20px;
  }

  .logo-name h1 {
    font-size: 1rem;
  }

  .nav-links {
    gap: 1.2rem;
  }

  .nav-links a {
    font-size: 0.9rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content h2 {
    font-size: 1.5rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-image {
    max-width: 45%;
  }
}

@media screen and (max-width: 768px) {
  .container {
    width: 95%;
    padding: 0 10px;
  }

  .logo-container {
    gap: 5px;
    max-width: 180px;
  }

  .logo {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .logo-name h1 {
    font-size: 0.9rem;
  }

  .nav-links {
    position: fixed;
    top: -100vh;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--card-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: top 0.5s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  .nav-links.show {
    top: 0;
  }

  .hamburger {
    display: block;
    z-index: 1000;
  }

  .hero .container {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
  }

  .hero-image {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .cta-buttons,
  .social-links {
    justify-content: center;
  }

  /* Resume section responsive */
  .resume-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .resume-download {
    padding: 1.5rem;
    max-width: 450px;
    margin: 0 auto;
  }

  .timeline-item {
    padding-left: 2rem;
  }

  .timeline-content {
    padding: 1rem;
  }

  .resume-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
  }

  /* Contact section responsive */
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-info {
    order: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .contact-form {
    order: 1;
    max-width: 550px;
    margin: 0 auto;
  }

  .contact-item {
    padding: 1rem;
  }

  .social-links.large {
    margin-top: 1rem;
    grid-column: span 2;
    display: flex;
    justify-content: center;
    gap: 1rem;
  }

  /* Adjust other section styles for mobile */
  section {
    padding: 5rem 0;
  }
}

@media screen and (max-width: 600px) {

  /* For smaller tablets and large phones */
  .contact-info {
    grid-template-columns: 1fr;
  }

  .social-links.large {
    grid-column: span 1;
  }

  section {
    padding: 4rem 0;
  }
}

@media screen and (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content h2 {
    font-size: 1.2rem;
  }

  .hero-content p {
    font-size: 0.9rem;
  }

  .hero-image {
    max-width: 250px;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  /* Resume section extra small devices */
  .timeline::before {
    left: 0;
  }

  .timeline-item::before {
    left: -6px;
    width: 14px;
    height: 14px;
  }

  .timeline-content h4 {
    font-size: 1.1rem;
  }

  .timeline-content h5 {
    font-size: 0.9rem;
  }

  .timeline-content p {
    font-size: 0.9rem;
  }

  .resume-section {
    margin-bottom: 2rem;
  }

  .resume-section h3 {
    font-size: 1.3rem;
  }

  .timeline-item {
    margin-bottom: 1.5rem;
  }

  /* Contact section extra small devices */
  .form-group input,
  .form-group textarea {
    padding: 0.6rem;
  }

  .social-links.large a {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .contact-item i {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 2.5rem;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .contact-item h3 {
    font-size: 1.1rem;
  }
}

/* Terminal styles */
.terminal-container {
  width: 100%;
  height: 400px;
  background-color: var(--terminal-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  font-family: 'Courier New', monospace;
  margin-bottom: 30px;
}

.terminal-header {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: var(--terminal-header-bg);
  height: 30px;
}

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

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.close {
  background-color: #ff5f56;
}

.minimize {
  background-color: #ffbd2e;
}

.maximize {
  background-color: #27c93f;
}

.terminal-title {
  margin-left: 20px;
  color: #ddd;
  font-size: 14px;
}

.terminal-body {
  padding: 15px;
  height: calc(100% - 60px);
  overflow-y: auto;
  color: #fff;
}

.terminal-output {
  margin-bottom: 15px;
}

.terminal-output p {
  margin: 8px 0;
  line-height: 1.5;
}

.command {
  color: #64d9ef;
  font-weight: bold;
}

.prompt {
  color: #64d9ef;
  font-weight: bold;
  margin-right: 8px;
}

.terminal-input-line {
  display: flex;
  align-items: center;
}

#terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  caret-color: #fff;
  outline: none;
}

.error {
  color: #ff5f56;
}

.success {
  color: #27c93f;
}

.highlight {
  color: #0d4dd6;
}

/* Theme switch */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  margin-right: 20px;
}

.theme-switch {
  display: inline-block;
  height: 34px;
  position: relative;
  width: 60px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
}

.slider .fa-sun {
  color: #f39c12;
  font-size: 14px;
  margin-left: 4px;
}

.slider .fa-moon {
  color: #f5f5f5;
  font-size: 14px;
  margin-right: 4px;
}

.slider:before {
  background-color: white;
  bottom: 4px;
  content: "";
  height: 26px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 26px;
  z-index: 1;
}

input:checked+.slider {
  background-color: #2a2a2a;
}

input:checked+.slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Special styling for About Me terminal in dark mode */
[data-theme="dark"] .about .terminal-container {
  background-color: white;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .about .terminal-header {
  background-color: #e1e1e1;
}

[data-theme="dark"] .about .terminal-title {
  color: #333;
}

[data-theme="dark"] .about .terminal-body {
  color: #333;
}

[data-theme="dark"] .about .terminal-output p {
  color: #333;
}

[data-theme="dark"] .about .prompt {
  color: #0066cc;
}

[data-theme="dark"] .about .command {
  color: #0066cc;
}

[data-theme="dark"] .about #terminal-input {
  color: #333;
  caret-color: #333;
}

[data-theme="dark"] .about .error {
  color: #cc0000;
}

[data-theme="dark"] .about .success {
  color: #00aa00;
}

[data-theme="dark"] .about .highlight {
  color: #0d4dd6;
}

[data-theme="dark"] .about .control.close,
[data-theme="dark"] .about .control.minimize,
[data-theme="dark"] .about .control.maximize {
  opacity: 0.8;
}

[data-theme="dark"] .about .terminal-input-line .prompt {
  color: #0066cc;
  margin-right: 8px;
}

/* Project Links Styling */
.project-links {
  display: flex;
  justify-content: center;
  gap: 10px;
}