/* === Global Variables === */
:root {
  --bg-color: #ffffff;
  --text-color: #222222;
  --accent-color: #000000;
  --light-gray: #f5f5f5;
  --button-bg: #000000;
  --button-hover-bg: #333333;
  --input-bg: #ffffff;
  --input-text: #222222;
  --border-color: #dddddd;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #ddd;
}

nav h1 {
  font-size: 1.8rem;
  font-weight: bold;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
}

.nav-links a:hover {
  text-decoration: underline;
}

section {
  margin-top: 4rem;
}

section h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.about-section,
.contact-section,
.skills-section,
.guestbook-section {
  background-color: var(--input-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  margin-bottom: 3rem;
}

.about-section h2,
.contact-section h2,
.skills-section h2,
.guestbook-section h2 {
  color: var(--button-bg);
  border-bottom: 2px solid var(--button-bg);
  display: inline-block;
  padding-bottom: 0.3rem;
  margin-bottom: 1rem;
}

.about-section p,
.contact-section p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.about-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 1rem auto;
  display: block;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

ul {
  list-style: none;
  padding-left: 0;
}

li {
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

a {
  color: var(--button-bg);
  font-weight: bold;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* === Skills Section === */
.skills-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.skills-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.skill-pair {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.skill-card,
.skill {
  flex: 1 1 45%;
  background-color: var(--input-bg);
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.skill span {
  font-weight: bold;
  margin-bottom: 0.5rem;
  display: block;
}

.skill-bar {
  background-color: #e0e0e0;
  border-radius: 25px;
  overflow: hidden;
  height: 22px;
  margin-top: 0.5rem;
}

.skill-fill {
  background-color: black;
  color: white;
  text-align: right;
  padding-right: 10px;
  height: 100%;
  line-height: 22px;
  font-size: 0.9rem;
  font-weight: bold;
  transition: width 1.2s ease-in-out;
  border-radius: 30px;
}

/* === Typewriter Header === */
.typewriter {
  margin: 2rem auto;
  display: block;
  text-align: center;
  font-size: 1.8rem;
  font-weight: bold;
  width: fit-content;
  max-width: 100%;
  border-right: 3px solid var(--button-bg);
  white-space: nowrap;
  overflow: hidden;
  animation: typing 3s steps(30, end), blink 0.7s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink {
  50% { border-color: transparent }
}

/* === Projects === */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.project {
  background-color: var(--light-gray);
  padding: 1.5rem;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* === Forms === */
form {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input,
textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background-color: var(--input-bg);
  color: var(--input-text);
}

input:focus,
textarea:focus {
  border-color: var(--button-bg);
  outline: none;
}

.send-button,
#commentForm button {
  background-color: var(--button-bg);
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.send-button:hover,
#commentForm button:hover {
  background-color: var(--button-hover-bg);
  transform: translateY(-2px);
}

/* === Guestbook Comments === */
#commentForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

#commentList {
  background-color: white;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
}

.comment {
  border-bottom: 1px solid #eee;
  padding: 8px 0;
}

.comment:last-child {
  border-bottom: none;
}

/* === Footer === */
footer {
  text-align: center;
  padding: 2rem 0 1rem;
  color: #aaa;
  font-size: 0.9rem;
  margin-top: 4rem;
}
