/* --- Palette Noir & Blanc Pro --- */
:root {
  --main-bg: #101010;
  --card-bg: #181818;
  --accent: #e0e0e0;
  --accent-light: #232323;
  --text-main: #f5f5f7;
  --text-secondary: #b3b3b3;
  --border: #232323;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--main-bg);
  color: var(--text-main);
  font-family: 'Fira Mono', monospace;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  line-height: 1.6;
}

/* --- Header --- */
.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin: 0;
}

.nav {
  display: flex;
  gap: 10px;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 4px;
  transition: background 0.18s, color 0.18s;
  letter-spacing: 0.01em;
}

.nav a:hover,
.nav a:focus {
  background: var(--accent-light);
  color: var(--accent);
}

/* Responsive header */
@media (max-width: 700px) {
  .header-content {
    flex-direction: column;
    height: auto;
    gap: 2px;
    padding: 6px 4px;
    align-items: flex-start;
  }
  .logo {
    margin-bottom: 2px;
    font-size: 1rem;
  }
  .nav {
    width: 100%;
    justify-content: center;
    gap: 12px;
  }
}

/* --- Hero Section --- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 45vh;
  padding: 32px 0 16px 0;
}

.hero-content {
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
  animation: fadeIn 1.2s;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  margin-bottom: 16px;
  box-shadow: 0 2px 8px #0004;
  object-fit: cover;
}

.hero-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #181818;
  font-weight: 600;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 0.97rem;
  text-decoration: none;
  border: none;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.cta-btn:hover {
  background: #fff;
  color: #101010;
  transform: translateY(-1px) scale(1.03);
}

.cta-btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.cta-btn.secondary:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.social-icon {
  width: 24px;
  height: 24px;
  opacity: 0.8;
  transition: transform 0.2s, opacity 0.2s;
}

.social-icon:hover {
  transform: scale(1.08) rotate(-4deg);
  opacity: 1;
}

/* --- Section Titles --- */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Skills Section --- */
.skills-section {
  max-width: 900px;
  margin: 0 auto 24px auto;
  padding: 0 12px 16px 12px;
  text-align: center;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}

.skill-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  min-width: 150px;
  max-width: 200px;
  color: #fff;
  box-shadow: 0 2px 8px #0001;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.skill-title {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.98rem;
  margin-bottom: 2px;
}

.skill-desc {
  color: var(--text-secondary);
  font-size: 0.93rem;
}

/* --- Projects Section --- */
.projects-section {
  max-width: 1100px;
  margin: 0 auto 24px auto;
  padding: 0 12px 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.projects-slider-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
}

.projects-slider {
  overflow: hidden;
  width: 100%;
  max-width: 800px;
}

.projects-grid {
  display: flex;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
  gap: 18px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 12px 10px 12px;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.07);
  transition: transform 0.14s, box-shadow 0.14s, border 0.14s;
  display: flex;
  flex-direction: column;
  min-width: 260px;
  max-width: 320px;
  min-height: 120px;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 4px 16px 0 #0004, 0 2px 8px 0 rgba(0,0,0,0.10);
  border: 1.5px solid var(--accent);
}

.project-img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 6px 6px 0 0;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px #0002;
}

.project-content h3 {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 4px;
  font-weight: 700;
}

.project-content p {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.5;
}

.project-tags {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--accent);
  background: var(--main-bg);
  border-radius: 5px;
  padding: 2px 8px;
  letter-spacing: 0.3px;
}

.slider-arrow {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 1.3rem;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s;
  margin: 0 6px;
  user-select: none;
}

.slider-arrow:hover {
  background: var(--accent);
  color: #181818;
  border-color: var(--accent);
}

/* --- Contact Section --- */
.contact-section {
  max-width: 600px;
  margin: 0 auto 24px auto;
  padding: 0 12px 24px 12px;
  text-align: center;
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 12px;
  margin: 0 auto;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.07);
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-message p {
  color: var(--text-secondary);
  font-size: 0.97rem;
  margin-bottom: 8px;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 12px 0 6px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
  background: var(--card-bg);
}

/* --- Text Animation --- */
.text-animation {
  display: inline-block;
  position: relative;
  min-width: 50px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.text-animation::after {
  content: "";
  position: absolute;
  right: -6px;
  width: 2px;
  height: 100%;
  background-color: var(--accent);
  animation: blink 0.7s steps(1) infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px);}
  to { opacity: 1; transform: translateY(0);}
}

/* --- Modal Contact --- */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}

.modal-content {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 40px 36px 32px 36px;
  min-width: 380px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 4px 32px #000a;
  position: relative;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-content h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.15rem;
  color: var(--accent);
  text-align: center;
}

.modal-content label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0;
  gap: 6px;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--main-bg);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: border 0.18s, box-shadow 0.18s;
  box-shadow: 0 1px 4px #0002;
}

.modal-content input:focus,
.modal-content textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #e0e0e044;
}

.modal-content textarea {
  min-height: 90px;
  resize: vertical;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}

.modal-content button[type="submit"].cta-btn {
  align-self: center;
  width: 60%;
  min-width: 120px;
  max-width: 220px;
  margin-top: 8px;
  font-size: 1.05rem;
  padding: 12px 0;
  border-radius: 7px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px #0002;
}

.modal-close {
  position: absolute;
  top: 10px; right: 14px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--accent);
}

#form-success {
  text-align: center;
  font-size: 1.05rem;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.01em;
}

@media (max-width: 600px) {
  .modal-content {
    min-width: 90vw;
    padding: 18px 6px 14px 6px;
  }
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .header-content, .skills-section, .projects-section, .contact-section {
    padding-left: 4px;
    padding-right: 4px;
  }
  .projects-slider { max-width: 98vw; }
  .slider-arrow { font-size: 1.1rem; width: 26px; height: 26px; }
}

@media (max-width: 700px) {
  .header-content {
    flex-direction: column;
    height: auto;
    gap: 2px;
    padding: 6px 4px;
    align-items: flex-start;
  }
  .logo {
    margin-bottom: 2px;
    font-size: 1rem;
  }
  .nav {
    width: 100%;
    justify-content: center;
    gap: 12px;
  }
  .hero-title { font-size: 1rem; }
  .hero-desc { font-size: 0.93rem; }
  .projects-grid { gap: 6px; }
  .project-card { padding: 6px 2px; }
  .contact-card { padding: 6px 2px; }
  .section-title { font-size: 0.98rem; padding-bottom: 2px; }
  .cta-buttons {
    flex-direction: column;
    gap: 4px;
  }
  .cta-btn {
    width: 100%;
    font-size: 0.93rem;
    padding: 6px 0;
  }
  .avatar { width: 40px; height: 40px; }
  .skills-section { padding: 0 1px 8px 1px; }
  .skill-card { padding: 6px 2px; min-width: 90vw; }
  .project-img { height: 32px; }
}