:root {
  --secondary-background-color: #1e1e1e;
  --primary-background-color: #09090b;
  --modal-overlay: rgba(0, 0, 0, 0.4);
  --modal-shadow: rgba(0, 0, 0, 0.2);
  --terminal-scroll-thumb: #27272a;
  --terminal-scroll-hover: #333336;
  --primary-border-color: #27272a;
  --primary-text-color: #a1a1aa;
  --close-hover-color: #e11d48;
  --highlight-color: #166fff;
  --highlight-hover: #58a6ff;
  --primary-color: #09090b;
  --terminal-bg: #0d1117;
  --terminal-fg: #c9d1d9;
  --btn-border: #2e2e2e;
  
  --font-family-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-family-mono: 'Courier New', monospace;
  --font-size-button: 14px;
  --font-size-base: 15px;
  --font-size-h1: 36px;
  --font-size-h2: 20px;
  --font-size-p: 15px;
  
  --section-margin: 0 30px;
  --table-padding: 12px;
  --list-spacing: 30px;
  --list-indent: 40px;

  --radius-xl: 12px;
  --radius-sm: 4px;
  --radius-md: 5px;
  --radius-lg: 8px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-xs: 0 2px 6px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 24px var(--modal-shadow);
}

body {
  font-family: var(--font-family-base);
  background-color: var(--primary-background-color);
  color: #ffffff;
  display: flex;
  flex-direction: row;
  margin: 0;
}

section {
  margin: var(--section-margin);
}

h1 {
  text-align: center;
  color: #ffffff;
  font-size: var(--font-size-h1);
  margin-bottom: 20px;
}

h2 {
  text-align: left;
  color: #ffffff;
  margin: 40px 0 0;
  font-size: var(--font-size-h2);
}

p {
  font-size: var(--font-size-p);
  text-align: justify;
  max-width: 800px;
  line-height: 1.6;
}

ul {
  list-style-type: disc;
  padding-left: var(--list-indent);
  line-height: 2;
  font-size: var(--font-size-base);
  margin: 0 0 var(--list-spacing);
  flex: 1;
}

img {
  width: 180px;
  border-radius: var(--radius-xl);
  display: block;
  margin: auto;
  box-shadow: var(--shadow-sm);
}

table {
  width: 90%;
  border-collapse: collapse;
  border-color: var(--primary-border-color);
  background-color: var(--primary-background-color);
  box-shadow: var(--shadow-md);
}

th, td {
  border: 1px solid var(--primary-border-color);
  padding: var(--table-padding);
  font-size: var(--font-size-base);
}

th {
  background-color: var(--primary-color);
  color: var(--primary-text-color);
  text-align: left;
  font-weight: 400;
}

td img {
  width: 50px;
  border-radius: var(--radius-sm);
}

.profile-section,
.terminal-section {
  display: flex;
  flex: 1;
  flex-direction: column;
}

a {
  display: block;
  text-align: left;
  color: var(--highlight-color);
  text-decoration: none;
  font-weight: bold;
  font-size: var(--font-size-base);
  transition: color 0.3s;
}

a:hover {
  color: var(--highlight-hover);
}

.hobby-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.hobby-image {
  flex: 1;
  margin-bottom: 40px;
  border: 1px solid var(--primary-border-color);
  border-radius: 5px;
  height: 150px;
  object-fit: cover;
  object-position: bottom;
  overflow: hidden;
}

button {
  width: 250px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--secondary-background-color);
  color: #ffffff;
  border: 1px solid var(--btn-border);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-button);
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-xs);
  margin: 40px 0 0 0;
  cursor: pointer;
}

button:hover {
  transform: scale(1.03);
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--modal-overlay);
  backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: var(--secondary-background-color);
  padding: 30px;
  width: 90%;
  max-width: 200px;
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: fadeIn 0.3s ease-out;
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
}

.close:hover {
  color: var(--close-hover-color);
}

.terminal {
  background-color: var(--terminal-bg);
  color: var(--terminal-fg);
  font-family: var(--font-family-mono);
  padding: 20px;
  border-radius: var(--radius-lg);
  width: calc(100% - 40px);
  margin: 45px 0;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--primary-border-color);
  overflow-y: auto;
  height: calc(100vh - 140px);
}

.terminal-output {
  white-space: pre-wrap;
  line-height: 1.5;
  margin-bottom: 10px;
}

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

.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
}

#terminal-input {
  background: transparent;
  border: none;
  color: var(--terminal-fg);
  outline: none;
  font-family: inherit;
  font-size: 1em;
  flex: 1;
  z-index: 2;
}

.terminal pre {
  white-space: pre-wrap;
  word-break: break-word;
}

#suggestion {
  position: absolute;
  left: 0;
  top: 0;
  color: #6e7681;
  z-index: 1;
  pointer-events: none;
  font-family: inherit;
  font-size: 1em;
  white-space: pre;
  user-select: none;
  opacity: 0.5;
}

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

.terminal strong {
  color: var(--highlight-hover);
}

.terminal::-webkit-scrollbar {
  width: 5px;
}

.terminal::-webkit-scrollbar-track {
  background: var(--terminal-bg);
  border-radius: var(--radius-lg);
}

.terminal::-webkit-scrollbar-thumb {
  background: var(--terminal-scroll-thumb);
  border-radius: var(--radius-lg);
}

.terminal::-webkit-scrollbar-thumb:hover {
  background: var(--terminal-scroll-hover);
}

.social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.social-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--secondary-background-color);
  color: #ffffff;
  border: 1px solid var(--btn-border);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-button);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-xs);
}

.social-btn:hover {
  background-color: #27272a;
  border-color: #3f3f46;
  transform: scale(1.03);
  color: var(--highlight-color);
}

@media (max-width: 1300px) {
  body {
    flex-direction: column;
  }

  .profile-section,
  .terminal-section {
    width: calc(100% - 60px);
    max-width: 100%;
  }

  .terminal {
    margin-top: 20px;
    height: auto;
    max-height: 450px;
    min-height: 450px;
  }
}

@media (max-width: 783px) {
  body {
    flex-direction: column;
  }

  .hobby-container {
    flex-direction: column;
  }

  ul {
    flex: unset;
  }

  .hobby-image {
    flex: usnet;
    width: 100%;
    height: auto;
  }
}