:root{
    --pink: #ffe3c2;
    --pink-deep: #f6b88f;
    --magenta: #c1502e;
    --cream: #fffdf7;
    --navy: #2c3a3a;
    --text: #3a2e2a;
    --grey: #8a7a6f;
    --sage: #8aa68a;
    --gold: #e3b23c;
  }

  *{margin:0;padding:0;box-sizing:border-box;}

  body{
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--text);
    line-height: 1.6;
    background-color: #fff6ec;
    background-image:
      radial-gradient(circle at 12% 18%, rgba(241,184,143,0.55) 0%, transparent 38%),
      radial-gradient(circle at 85% 8%, rgba(138,166,138,0.4) 0%, transparent 42%),
      radial-gradient(circle at 78% 78%, rgba(227,178,60,0.35) 0%, transparent 45%),
      radial-gradient(circle at 8% 85%, rgba(193,80,46,0.25) 0%, transparent 40%),
      repeating-linear-gradient(135deg, rgba(58,46,42,0.025) 0px, rgba(58,46,42,0.025) 2px, transparent 2px, transparent 12px);
    background-attachment: fixed;
    background-size: cover;
  }

  h1,h2,h3{
    font-family: 'Trebuchet MS', 'Helvetica Neue', sans-serif;
    color: var(--magenta);
    letter-spacing: 0.5px;
  }

  nav{
    background: var(--navy);
    display:flex;
    justify-content:center;
    gap: 2.5rem;
    padding: 1.2rem 1rem;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  }
  nav a{
    text-decoration:none;
    color: #f5ece1;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Trebuchet MS', sans-serif;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    display:inline-block;
    transition: color 0.2s, background-color 0.2s, transform 0.2s;
  }
  nav a:hover, nav a:focus{
    color: var(--navy);
    background-color: var(--gold);
    transform: scale(1.08);
  }

  section{
    max-width: 1000px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem;
  }

  .card{
    background: var(--cream);
    border-radius: 18px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  }

  h2{
    text-align:center;
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .about-top{
    display:flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    align-items:flex-start;
  }
  .about-photo{
    flex: 1 1 260px;
    aspect-ratio: 1/1;
    background: linear-gradient(135deg,var(--pink),var(--pink-deep));
    border-radius: 14px;
    display:flex;
    align-items:center;
    justify-content:center;
    color: white;
    font-family:'Trebuchet MS',sans-serif;
    font-size: 0.95rem;
    text-align:center;
    padding:1rem;
    overflow:hidden;
  }
  .about-photo img{ width:100%; height:100%; object-fit:cover; }
  .about-text{
    flex: 2 1 380px;
  }
  .about-text p{ margin-bottom: 1rem; color: var(--grey); }

  .contact-grid{
    display:grid;
    grid-template-columns: repeat(3,1fr);
    gap:1.5rem;
    margin-top: 2.5rem;
  }
  .contact-box{
    background: var(--pink);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align:center;
    transition: transform 0.25s, background-color 0.25s, box-shadow 0.25s;
    cursor: default;
  }
  .contact-box:hover{
    background: var(--gold);
    transform: scale(1.06);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  }
  .contact-box h3{
    font-size: 1rem;
    margin-bottom:0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  .contact-box a, .contact-box span{
    color: var(--text);
    font-size: 0.95rem;
    word-break: break-word;
    text-decoration:none;
  }
  .contact-box a:hover{ color: var(--magenta); }

  @media (max-width: 650px){
    .contact-grid{ grid-template-columns: 1fr; }
  }

  .slider{
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    aspect-ratio: 4/3;
    border-radius: 14px;
    overflow:hidden;
    background: var(--pink);
  }
  .slider .slide{
    position:absolute;
    inset:0;
    display:none;
    flex-direction: column;
    align-items:center;
    justify-content:center;
    color: white;
    font-family:'Trebuchet MS',sans-serif;
    font-size:1.1rem;
    text-align:center;
    background: linear-gradient(135deg,var(--navy),#384266);
    padding:1rem;
    overflow:hidden;
  }
  .slider .slide.active{ display:flex; }

  .slider .slide:has(.slide-image){
    padding:0;
    justify-content:flex-start;
  }

  .slide-image{
    flex:1;
    width:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
  }
  .slide-image img,
  .slide-image video{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
  }

  .slide-caption{
    width:100%;
    padding: 0.6rem 1rem;
    font-size:0.9rem;
    color: var(--cream);
    background: rgba(0,0,0,0.35);
    margin:0;
  }

  .slider .slide > video,
  .slider .slide > img{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
  }
  .slider-btn{
    position:absolute;
    top:50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.85);
    border:none;
    width: 42px;
    height: 42px;
    border-radius:50%;
    font-size:1.3rem;
    cursor:pointer;
    color: var(--magenta);
    font-weight:bold;
    transition: background 0.2s;
  }
  .slider-btn:hover{ background:white; }
  .slider-btn.prev{ left: 14px; }
  .slider-btn.next{ right: 14px; }
  .slider-dots{
    text-align:center;
    margin-top: 1rem;
  }
  .slider-dots span{
    display:inline-block;
    width:9px; height:9px;
    border-radius:50%;
    background: var(--pink-deep);
    margin: 0 4px;
    cursor:pointer;
  }
  .slider-dots span.active{ background: var(--magenta); }

  .sub-gallery-grid{
    display:flex;
    gap: 2.5rem;
    flex-wrap: wrap;
  }
  .sub-gallery{
    flex: 1 1 320px;
    display:flex;
    flex-direction:column;
  }
  .sub-gallery h3{
    text-align:center;
    margin-bottom: 1rem;
  }

  .visual-grid{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
  }
  .visual-cell{
    aspect-ratio: 1/1;
    background: var(--pink);
    border-radius: 12px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    color: var(--grey);
    font-family:'Trebuchet MS',sans-serif;
    font-size: 0.85rem;
    text-align:center;
    overflow:hidden;
    border: 1px dashed var(--pink-deep);
  }
  .visual-cell img{ width:100%; height:100%; object-fit:cover; }

  @media (max-width: 600px){
    .visual-grid{ grid-template-columns: repeat(2,1fr); }
  }

  .group-title{
    text-align:center;
    margin-bottom: 1.2rem;
  }
  .group-title:not(:first-child){
    margin-top: 2.5rem;
  }
  .interactive-grid{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  .interactive-item{
    background: var(--pink);
    border-radius: 12px;
    padding: 1rem;
  }
  .interactive-item .placeholder{
    aspect-ratio: 16/9;
    background: var(--navy);
    border-radius: 8px;
    display:flex;
    align-items:center;
    justify-content:center;
    color: white;
    font-family:'Trebuchet MS',sans-serif;
    font-size: 0.9rem;
    overflow:hidden;
    margin-bottom: 0.7rem;
  }
  .interactive-item .placeholder img,
  .interactive-item .placeholder video{ width:100%; height:100%; object-fit:cover; }
  .interactive-item p{
    font-family:'Trebuchet MS',sans-serif;
    font-size:0.85rem;
    color: var(--grey);
    text-align:center;
  }
  @media (max-width:850px){
    .interactive-grid{ grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width:650px){
    .interactive-grid{ grid-template-columns: 1fr; }
  }

  .graphic-top{
    display:flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items:flex-start;
    margin-bottom: 3rem;
  }
  .graphic-img{
    flex: 1 1 260px;
    aspect-ratio: 1/1;
    background: var(--pink);
    border-radius: 12px;
    display:flex;
    align-items:center;
    justify-content:center;
    color: var(--grey);
    font-family:'Trebuchet MS',sans-serif;
    text-align:center;
    overflow:hidden;
  }
  .graphic-img img{ width:100%; height:100%; object-fit:cover; }
  .code-box{
    flex: 1 1 320px;
    background: #f4f4f4;
    border-radius: 10px;
    padding: 1.2rem;
    font-family: monospace;
    font-size: 0.78rem;
    color: #555;
    overflow-x:auto;
    max-height: 320px;
    overflow-y:auto;
  }
  .code-box h3{ margin-bottom:0.6rem; font-family:'Trebuchet MS',sans-serif; }

  .illustration-block{
    display:flex;
    gap:2rem;
    flex-wrap:wrap;
    align-items:center;
    background: var(--pink);
    border-radius: 14px;
    padding: 2rem;
  }
  .illustration-img{
    flex: 1 1 240px;
    aspect-ratio: 4/5;
    background: var(--navy);
    border-radius: 10px;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
    color:white;
    font-family:'Trebuchet MS',sans-serif;
  }
  .illustration-img img{ width:100%; height:100%; object-fit:cover; }
  .poem{
    flex: 1 1 240px;
  }
  .poem h3{ margin-bottom:1rem; }
  .poem p{ margin-bottom: 0.9rem; color: var(--text); font-size:0.95rem; }

  footer{
    text-align:center;
    padding: 2rem;
    color: var(--grey);
    font-family:'Trebuchet MS',sans-serif;
    font-size:0.85rem;
  }

  .about-me{ color: var(--grey); font-size: 0.95rem; }

.poster-center .interactive-item{
    max-width: 500px;
    margin: 0 auto;
}

#grafika .interactive-grid {
    grid-template-columns: repeat(3, 1fr);
}

#grafika .interactive-item {
    padding: 1rem;
}

#grafika .placeholder {
    height: 350px;
    aspect-ratio: auto;
    background: transparent;
}

#grafika .placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.poster-center {
    grid-template-columns: 1fr !important;
}

.poster-center .interactive-item {
    width: 300px;
    max-width: 100%;
    margin: 0 auto;
}

#interaktivitate .interactive-item {
    transition: transform 0.3s ease;
    cursor: pointer;
}

#interaktivitate .interactive-item:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,0.9);
}

.modal-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    inset: 0;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}