:root {
    --primary: #5e35b1;
    --secondary: #b45ae5;
    --accent: #9575cd;
    --dark: #4527a0;
    --text: #333;
    --bg: #f8f5ff;
    --white: #ffffff;
    --shadow: 0 4px 8px rgba(94, 53, 177, 0.2);
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-accent: 'Georgia', serif;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
  }
  
  img {
    max-width: 100%;
  }
  
  a {
    text-decoration: none;
    color: rgb(175, 154, 224);
    transition: color 0.3s;
  }
  
  a:hover {
    color: var(--secondary);
  }
  
  h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
  }
  
  h2::after {
    content: '';
    display: block;
    width: 50%;
    height: 3px;
    background-color: var(--secondary);
    position: absolute;
    bottom: -5px;
    left: 25%;
  }
  
  button, .button {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
  }
  
  button:hover, .button:hover {
    background-color: var(--dark);
  }
  
  header, footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 1.5rem;
  }
  
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }
  
  header h1 {
    font-family: var(--font-accent);
    font-size: 2rem;
  }
  
  nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
  }
  
  nav a {
    font-weight: 500;
    padding: 0.5rem;
  }
  
  nav a.active {
    color: var(--secondary);
    border-bottom: 2px solid var(--secondary);
  }
  
  main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }
  
  .page-intro {
    margin-bottom: 2rem;
    text-align: center;
  }
  
  footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .social-links {
    display: flex;
    gap: 1rem;
  }
  
  .social-links a {
    color: var(--secondary);
  }
  
  .about-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
  }
  
  .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
  }
  
  .photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
  }
  
  .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .portfolio-item {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: grid;
    grid-template-rows: auto auto 1fr;
  }
  
  .portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 16px rgba(94, 53, 177, 0.3);
  }
  
  .portfolio-item h3 {
    padding: 1rem;
    background-color: var(--dark);
    color: var(--white);
    text-align: center;
    font-size: 1.3rem;
  }
  
  .portfolio-image {
    height: 200px;
    overflow: hidden;
  }
  
  .portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
  }
  
  .portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
  }
  
  .portfolio-description {
    padding: 1rem;
  }
  
  .gallery-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
  }
  
  .profile-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
  }
  
  .gallery-item img {
    height: 450px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    width: 100%;
    object-fit: cover;
  }
  
  .gallery-item figcaption {
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--accent);
    padding-bottom: 0.5rem;
    text-align: center;
  }
  
  .cv-container {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .cv-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 0.5rem;
  }
  
  .cv-item {
    margin-bottom: 1.5rem;
  }
  
  .cv-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
  }
  
  .cv-item-header h4 {
    font-weight: 600;
    color: var(--dark);
    
  }
  
  .cv-date {
    color: var(--accent);
    font-style: italic;
  }
  
  .cv-section ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-top: 0.5rem;
  }
  
  .skill-item {
    background-color: rgba(198, 34, 34, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-align: center;
    border-left: 3px solid var(--secondary);
  }
  
  .contact-form {
    max-width: 700px;
    margin: 0 auto;
  }
  
  .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .form-group {
    margin-bottom: 1rem;
  }
  
  .form-group.full-width {
    grid-column: span 2;
  }
  
  label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
  }
  
  input, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
  }
  
  input:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary);
  }
  
  textarea {
    min-height: 150px;
    resize: vertical;
  }
  
  @media (max-width: 768px) {
    header {
      flex-direction: column;
      text-align: center;
    }
    
    nav ul {
      justify-content: center;
      margin-top: 1rem;
    }
    
    .about-section,
    .photo-gallery,
    .form-grid {
      grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
      grid-column: 1;
    }
    
    footer {
      flex-direction: column;
      gap: 1rem;
      text-align: center;
    }
    
    .social-links {
      justify-content: center;
    }
    
    .cv-item-header {
      flex-direction: column;
    }
  }