/* Base Styles */
:root {
  --primary-color: #00e676; /* Neon green */
  --secondary-color: #1a237e; /* Deep blue */
  --accent-color: #ff3d00; /* Bright orange */
  --dark-bg: #121212; /* Almost black */
  --dark-surface: #1e1e1e; /* Code editor dark */
  --light-text: #f5f5f5; /* Off white */
  --code-comment: #6a9955; /* Green comments */
  --code-keyword: #569cd6; /* Blue keywords */
  --code-string: #ce9178; /* String color */
  --code-number: #b5cea8; /* Number color */
  --code-function: #dcdcaa; /* Function color */
  --terminal-green: #0f0; /* Terminal text green */
}

/* Matrix Animation */
@keyframes matrix-rain {
  0% {
    opacity: 1;
    transform: translateY(-100px);
  }
  75% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translateY(100vh);
  }
}

/* Typing Animation */
@keyframes typing {
  from { width: 0 }
  to { width: 11ch } /* "Hello World" 텍스트의 실제 길이로 수정 */
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--primary-color) }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Scanner effect */
@keyframes scanner {
  0% {
    box-shadow: 0 0 0 rgba(0, 230, 118, 0.4);
    background-position: 0% 0%;
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 230, 118, 0.7);
    background-position: 100% 100%;
  }
  100% {
    box-shadow: 0 0 0 rgba(0, 230, 118, 0.4);
    background-position: 0% 0%;
  }
}

body {
  margin: 0;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  background-color: var(--dark-bg);
  color: var(--light-text);
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.9) 50%, rgba(0, 0, 0, 0.7) 100%);
  z-index: -1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 5;
}

/* Code Rain Background */
.code-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4; /* 0.15에서 0.4로 약간 더 진하게 수정 */
}

.code-drop {
  position: absolute;
  color: var(--primary-color);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1;
  animation: matrix-rain 8s linear infinite;
  opacity: 0.8; /* 각 드롭의 기본 불투명도 증가 */
}

/* 가장자리 코드 비를 위한 추가 엘리먼트 스타일 */
.code-rain::before,
.code-rain::after {
  content: "";
  position: fixed;
  top: 0;
  width: 15%; /* 양쪽 가장자리 15% 영역 */
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.3; /* 가장자리는 더 진하게 */
  background: linear-gradient(
    to right,
    var(--primary-color) 0%,
    transparent 100%
  );
}

.code-rain::before {
  left: 0;
}

.code-rain::after {
  right: 0;
  transform: scaleX(-1); /* 오른쪽 가장자리 그라데이션 반전 */
}

/* Navigation Bar */
nav {
  background-color: rgba(18, 18, 18, 0.95);
  border-bottom: 1px solid var(--primary-color);
  box-shadow: 0 2px 15px rgba(0, 230, 118, 0.2);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(0, 230, 118, 0.7);
  display: flex;
  align-items: center;
}

.logo::before {
  content: "<";
  margin-right: 2px;
  opacity: 0.8;
}

.logo::after {
  content: "/>";
  margin-left: 2px;
  opacity: 0.8;
}

.nav-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
}

.nav-menu a {
  text-decoration: none;
  color: var(--light-text);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  position: relative;
  font-weight: 500;
  transition: all 0.3s;
}

.nav-menu a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-menu a:hover {
  color: var(--primary-color);
}

.nav-menu a:hover::before {
  width: 100%;
}

.nav-menu a .icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s;
}

.nav-menu a:hover .icon {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 5px var(--primary-color));
}

.button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.button-outline {
  background-color: rgba(0, 230, 118, 0.1);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.3);
  transition: all 0.3s;
}

.button-outline:hover {
  background-color: var(--primary-color);
  color: var(--dark-bg);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.7);
}

.button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.button:hover::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

/* Main Content */
main {
  padding: 48px 0;
}

.home-section {
  text-align: center;
  margin-bottom: 80px;
  position: relative;
  padding: 60px 20px;
  overflow: hidden;
}

.home-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(0, 230, 118, 0.1) 0%, rgba(26, 35, 126, 0.05) 70%, transparent 100%);
  z-index: -1;
}

.home-section h1 {
  font-size: 56px;
  margin-bottom: 24px;
  color: var(--light-text);
  font-weight: 800;
  position: relative;
  text-shadow: 0 0 15px rgba(0, 230, 118, 0.5);
  overflow: hidden;
  animation: float 4s ease-in-out infinite;
  max-width: 600px; /* 제목 전체의 최대 너비도 제한 */
  margin-left: auto;
  margin-right: auto;
}

.home-section h1::before {
  content: "< ";
  color: var(--code-comment);
  font-weight: normal;
}

.home-section h1::after {
  content: " />";
  color: var(--code-comment);
  font-weight: normal;
}

.home-section p {
  font-size: 20px;
  color: #abb2bf;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.home-section p::before {
  content: "// ";
  color: var(--code-comment);
}

.cta-button {
  background-color: var(--primary-color);
  color: var(--dark-bg);
  padding: 16px 36px;
  font-size: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  letter-spacing: 1px;
  box-shadow: 0 5px 15px rgba(0, 230, 118, 0.4);
  animation: scanner 3s infinite;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
  background-size: 200% 200%;
}

.cta-button:hover {
  background-color: #00c853;
  box-shadow: 0 5px 25px rgba(0, 230, 118, 0.6);
  transform: translateY(-2px);
}

.cta-button:active {
  transform: translateY(1px);
}

/* Terminal Design for Services */
.services {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 80px;
}

@media (min-width: 768px) {
  .services {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background-color: var(--dark-surface);
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--primary-color);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px 8px 0 0;
}

.service-card::after {
  content: "●";
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 14px;
  color: var(--accent-color);
}

.service-card h3 {
  font-size: 22px;
  margin-top: 30px;
  margin-bottom: 16px;
  color: var(--primary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
}

.service-card h3::before {
  content: "# ";
  color: var(--code-comment);
  margin-right: 5px;
}

.service-card p {
  color: #abb2bf;
  font-size: 16px;
  line-height: 1.6;
  position: relative;
  padding-left: 20px;
}

.service-card p::before {
  content: "$ ";
  color: var(--terminal-green);
  position: absolute;
  left: 0;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 230, 118, 0.3);
  border-color: #00e676;
}

.service-card-header {
  padding: 20px;
}

.service-card-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  opacity: 0;
}

.service-card.expanded .service-card-content {
  max-height: 500px;
  opacity: 1;
  transition: max-height 0.5s ease-in, opacity 0.3s ease-in;
}

.service-card-header h3::after {
  content: "▼";
  font-size: 12px;
  margin-left: 8px;
  transition: transform 0.3s ease;
  display: inline-block;
  opacity: 0.7;
}

.service-card.expanded .service-card-header h3::after {
  transform: rotate(180deg);
}

/* Icon Styling */
.icon {
  width: 20px;
  height: 20px;
  stroke-width: 2px;
  color: var(--primary-color);
}

/* Modal Portfolio Styling */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: var(--dark-surface);
  border-radius: 8px;
  border: 1px solid rgba(0, 230, 118, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 230, 118, 0.2);
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalFadeIn 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  position: relative;
}

.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: var(--dark-bg);
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.3);
}

.modal-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin: 0;
  display: flex;
  align-items: center;
}

.modal-title::before {
  content: "import ";
  font-weight: normal;
  color: var(--code-keyword);
  margin-right: 8px;
}

.modal-title::after {
  content: " from './projects'";
  font-weight: normal;
  color: #abb2bf;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #abb2bf;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.modal-close:hover {
  color: var(--accent-color);
  background-color: rgba(255, 61, 0, 0.1);
  transform: rotate(90deg);
}

.modal-body {
  padding: 30px 25px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 640px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.portfolio-item {
  background-color: rgba(30, 30, 30, 0.7);
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: all 0.4s;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.portfolio-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0, 230, 118, 0.05) 0%, rgba(255, 61, 0, 0.05) 100%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s;
}

.portfolio-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 230, 118, 0.2);
  border-color: rgba(0, 230, 118, 0.3);
}

.portfolio-item:hover::before {
  opacity: 1;
}

.portfolio-image {
  width: 100%;
  height: 180px;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-weight: bold;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
}

.portfolio-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    transparent 0px,
    transparent 1px,
    rgba(0, 230, 118, 0.1) 1px,
    rgba(0, 230, 118, 0.1) 2px
  );
  pointer-events: none;
  opacity: 0.5;
}

.portfolio-content {
  padding: 20px;
  position: relative;
  z-index: 2;
}

.portfolio-content h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--light-text);
  font-weight: 600;
  display: flex;
  align-items: center;
}

.portfolio-content h3::before {
  content: "class ";
  font-weight: normal;
  color: var(--code-keyword);
  font-size: 14px;
  margin-right: 8px;
}

.portfolio-content h3::after {
  content: " {}";
  font-weight: normal;
  color: #abb2bf;
}

.portfolio-content p {
  color: #abb2bf;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* Disable scroll on body when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Code highlighting & typing effect for specific elements */
.typing-effect {
  display: inline-block;
  overflow: hidden;
  border-right: 2px solid var(--primary-color);
  white-space: nowrap;
  width: 0;
  animation: 
    typing 2s steps(11, end) forwards,  /* 스텝 수를 문자 수에 맞게 조정 */
    blink-caret 0.75s step-end infinite;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .container {
    padding: 0 12px;
  }

  .nav-inner {
    flex-direction: column;
    height: auto;
    padding: 12px 0;
  }
  
  .logo {
    margin-bottom: 12px;
    font-size: 20px;
  }
  
  .nav-menu {
    width: 100%;
    margin-bottom: 12px;
  }

  .nav-menu ul {
    justify-content: center;
    gap: 16px;
  }

  .nav-menu a {
    font-size: 14px;
  }
  
  .button {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }
  
  .home-section {
    padding: 40px 12px;
  }

  .home-section h1 {
    font-size: 32px;
  }
  
  .home-section p {
    font-size: 16px;
    margin-bottom: 32px;
  }

  .cta-button {
    width: 100%;
    max-width: 280px;
    padding: 14px 24px;
    font-size: 16px;
  }

  .service-card {
    margin-bottom: 12px;
    padding: 20px;
  }

  .service-card h3 {
    font-size: 18px;
  }

  .service-card p {
    font-size: 14px;
  }

  .typing-effect {
    font-size: 28px;
  }

  .modal-content {
    width: 95%;
    max-height: 90vh;
    margin: 20px auto;
  }

  .modal-header {
    padding: 15px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-body {
    padding: 20px 15px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .portfolio-item {
    margin-bottom: 15px;
  }

  .portfolio-content h3 {
    font-size: 16px;
  }

  .portfolio-content p {
    font-size: 13px;
  }

  .code-window {
    font-size: 12px;
  }

  .code-body pre {
    font-size: 11px;
  }

  .activity-card {
    padding: 20px;
  }

  .activity-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
  }

  .activity-content h3 {
    font-size: 18px;
  }

  .activity-content p {
    font-size: 14px;
  }

  .activity-code {
    padding: 10px;
  }

  .activity-code pre {
    font-size: 12px;
  }

  .contact-info {
    padding: 20px;
  }

  .contact-item {
    padding: 12px;
    margin-bottom: 16px;
  }

  .contact-icon {
    width: 32px;
    height: 32px;
    margin-right: 12px;
  }

  .contact-detail h3 {
    font-size: 16px;
  }

  .contact-detail p {
    font-size: 14px;
  }

  .section-title {
    width: 85%;
    gap: 0.25rem;
  }

  .section-title .code-bracket {
    font-size: 0.85em;
  }

  .main-activities {
    padding: 40px 8px;
  }

  /* Code rain 최적화 */
  .code-drop {
    font-size: 12px;
  }

  /* 스크롤바 최적화 */
  .modal-content::-webkit-scrollbar {
    width: 6px;
  }
  
  .title-text {
    padding: 0 2px;
  }
}

/* 작은 모바일 화면을 위한 추가 최적화 */
@media (max-width: 480px) {
  .home-section h1 {
    font-size: 28px;
  }

  .nav-menu ul {
    gap: 12px;
  }

  .nav-menu a {
    font-size: 13px;
  }

  .modal-content {
    width: 98%;
  }

  .contact-item {
    flex-direction: column;
    text-align: center;
  }

  .contact-icon {
    margin: 0 auto 10px;
  }

  .section-title {
    width: 80%;
    letter-spacing: -0.02em;
  }

  .section-title .title-text {
    padding: 0 0.2em;
  }

  .section-title .code-bracket {
    font-size: 0.8em;
  }

  .main-activities {
    padding: 32px 6px;
  }
  
  .title-text {
    font-size: 0.9em;
  }
}

/* Code Snippets */
.code-snippet {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  padding: 15px;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.code-snippet::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 24px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 4px 4px 0 0;
}

.code-snippet::after {
  content: "○ ○ ○";
  position: absolute;
  top: 4px;
  left: 10px;
  font-size: 12px;
  color: var(--primary-color);
  opacity: 0.7;
}

.code-snippet pre {
  margin: 10px 0 0 0;
  padding: 15px 0 0 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.5;
  color: var(--light-text);
}

.code-snippet code {
  display: block;
  white-space: pre;
  overflow-x: auto;
  line-height: 1.6;
  padding: 0.5em;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.code-snippet code .code-line {
  display: block;
  padding: 2px 0;
}

.code-snippet code .code-line:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.code-snippet code {
  display: block;
  white-space: pre;
  overflow-x: auto;
}

.code-snippet .key {
  color: var(--primary-color);
}

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

/* Code syntax highlighting */
.code-keyword {
  color: var(--code-keyword);
}

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

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

.code-comment {
  color: var(--code-comment);
  font-style: italic;
}

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

.code-bracket {
  color: var(--light-text);
  opacity: 0.7;
  display: inline-flex;
  align-items: center;
  margin: 0 2px;
  font-size: 0.9em;
}

/* Code Window styling for portfolio items */
.code-window {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.5);
}

.code-header {
  height: 30px;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-color);
  margin-right: 5px;
  opacity: 0.7;
}

.code-dot:nth-child(2) {
  background-color: #ffb300;
}

.code-dot:nth-child(3) {
  background-color: var(--primary-color);
}

.code-title {
  color: var(--light-text);
  font-size: 12px;
  margin-left: 10px;
  opacity: 0.7;
}

.code-body {
  flex: 1;
  padding: 10px;
  overflow: hidden;
}

.code-body pre {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.4;
  color: var(--light-text);
}

.code-text {
  font-family: 'JetBrains Mono', monospace;
  opacity: 0.8;
}

/* Terminal Nav */
.terminal-nav {
  display: flex;
  align-items: center;
  background-color: #000;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-circles {
  display: flex;
  gap: 6px;
}

.terminal-circles span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--accent-color);
}

.terminal-circles span:nth-child(2) {
  background-color: #ffb300;
}

.terminal-circles span:nth-child(3) {
  background-color: var (--primary-color);
}

.feature-item h3 {
  font-size: 18px;
  color: var (--light-text);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

/* Contact Section */
.contact-section {
  margin-bottom: 80px;
  padding: 0 20px;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-terminal {
  background-color: #1e1e1e;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  height: 100%;
  border: 1px solid rgba(0, 230, 118, 0.2);
}

.terminal-header {
  background-color: #000000;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-body {
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--light-text);
  line-height: 1.6;
}

.command-line {
  margin-bottom: 15px;
  display: flex;
}

.prompt {
  color: var(--primary-color);
  margin-right: 8px;
}

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

.command-output p {
  margin: 8px 0;
  color: #abb2bf;
}

.terminal-link {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px dashed var(--primary-color);
  padding-bottom: 2px;
  transition: all 0.3s;
}

.terminal-link:hover {
  color: #00c853;
  border-bottom: 1px solid #00c853;
}

.comment {
  color: var(--code-comment);
  font-style: italic;
}

/* Contact Form */
.contact-form {
  background-color: rgba(30, 30, 30, 0.7);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border-left: 3px solid var(--primary-color);
}

.form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--light-text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  position: relative;
}

.required {
  color: var(--accent-color);
  margin-left: 3px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light-text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  border-radius: 4px;
  transition: all 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.2);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.contact-submit {
  margin-top: 10px;
  width: 100%;
  padding: 12px;
}

/* Main Activities Section */
.main-activities {
  padding: clamp(2rem, 5vw, 3.75rem) 0;
  margin-bottom: 5rem;
  width: 100%;
  position: relative;
}

.section-title {
  text-align: center;
  font-size: clamp(1.25rem, 5vw, 2rem);
  margin: 0 auto 2.5rem;
  color: var(--light-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 5%;
  width: 90%;
  max-width: 100%;
  position: relative;
  line-height: 1.4;
}

.section-title .title-text {
  display: inline-block;
  padding: 0 0.25em;
  white-space: nowrap;
}

.section-title .code-bracket {
  color: var(--light-text);
  opacity: 0.7;
  display: inline-flex;
  align-items: center;
  font-size: 0.9em;
  margin: 0 0.125em;
}

.activities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .activities-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.activity-card {
  background-color: var(--dark-surface);
  border-radius: 8px;
  padding: 24px;
  position: relative;
  transition: all 0.3s ease;
  border-left: 3px solid var(--primary-color);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 230, 118, 0.3);
}

.activity-icon {
  width: 48px;
  height: 48px;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.activity-content h3 {
  font-size: 20px;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.activity-content p {
  color: #abb2bf;
  line-height: 1.6;
  font-size: 15px;
}

.activity-code {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  padding: 12px;
  margin-top: auto;
}

.activity-code pre {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.4;
}

.activity-code code {
  color: var(--light-text);
}

.contact-info {
  padding: 30px;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  background-color: rgba(0, 230, 118, 0.05);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  background-color: rgba(0, 230, 118, 0.1);
  transform: translateX(5px);
}

.contact-icon {
  width: 40px;
  height: 40px;
  margin-right: 16px;
  color: var(--primary-color);
}

.contact-detail h3 {
  font-size: 18px;
  color: var (--light-text);
  margin-bottom: 4px;
}

.contact-detail p {
  color: var(--primary-color);
  font-size: 16px;
  margin: 0;
}

.contact-message {
  text-align: center;
  margin-top: 32px;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-message p {
  color: #abb2bf;
  font-size: 15px;
  margin: 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--light-text);
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
    position: absolute;
    right: 16px;
    top: 12px;
  }

  .nav-menu {
    display: none;
    width: 100%;
  }

  .nav-menu.active {
    display: block;
  }

  .nav-inner {
    position: relative;
  }
}