@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --bg: #0b0a12;
  --bg-soft: #131122;
  --surface: #19172a;
  --surface-hover: #242039;
  --text: #f5f3ff;
  --muted: #b8b2d4;
  --accent: #8a7dff;
  --accent-2: #2dd4bf;
  --border: #34304f;
}

* { box-sizing: border-box; }
html, body { margin: 0; scroll-behavior: smooth; }

body {
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 15%, rgba(138, 125, 255, 0.32), transparent 40%),
    radial-gradient(circle at 90% 5%, rgba(45, 212, 191, 0.22), transparent 35%),
    linear-gradient(160deg, #07060f 0%, #0d0c18 35%, #090810 100%);
  min-height: 100vh;
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(11, 10, 18, 0.7);
  border-bottom: 1px solid rgba(138, 125, 255, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.5rem;
}

.brand { font-family: 'Playfair Display', serif; font-size: 1.5rem; text-decoration: none; }
.top-nav { display: flex; gap: 1rem; font-size: 1.03rem; }
.top-nav a { text-decoration: none; color: var(--muted); }
.top-nav a:hover { color: var(--text); }

.language-switch button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

.language-switch .active,
.language-switch button:hover {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #0e0c17;
  border-color: transparent;
}

.section,
.hero { max-width: 1180px; margin: 0 auto; padding: 3rem 1.25rem; }
.hero { min-height: 72vh; display: grid; align-content: center; gap: 1rem; }

.hero-kicker {
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
}

h1, h2, h3 { font-family: 'Playfair Display', serif; margin: 0; }
.hero h1 { font-size: clamp(2rem, 5vw, 4rem); max-width: 14ch; }
.hero-intro { color: var(--muted); max-width: 62ch; }

.hero-cta {
  width: fit-content;
  text-decoration: none;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #0f0d19;
  font-weight: 700;
}

.projects-section > p,
.about-section p { color: var(--muted); }

.gallery {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.project-card { border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.project-link { position: relative; display: block; text-decoration: none; }

.project-link img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.02);
  transition: transform 0.45s ease;
}

.project-overlay {
  position: absolute;
  inset: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(4, 3, 9, 0.15) 20%, rgba(4, 3, 9, 0.9));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-overlay h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.project-overlay p { font-size: 0.9rem; color: #d7d1f5; margin-bottom: 0.7rem; }
.project-overlay span { color: var(--accent-2); font-weight: 700; }
.project-link:hover img { transform: scale(1.05); }
.project-link:hover .project-overlay { opacity: 1; }

.about-section {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  background: linear-gradient(155deg, rgba(25, 23, 42, 0.9), rgba(19, 17, 34, 0.86));
  border-radius: 14px;
}

.about-text {
  white-space: pre-line;
  line-height: 1.8;
  max-width: 70ch;
}

.contact-links {
  margin: 1.25rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  width: fit-content;
  border: 1px solid rgba(138, 125, 255, 0.25);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(14, 12, 24, 0.6);
}

.contact-links a,
.back-link,
.project-gallery-item,
.lightbox-controls button {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  padding: 0.55rem 0.8rem;
  text-decoration: none;
  cursor: pointer;
}

.contact-links a:hover,
.back-link:hover,
.lightbox-controls button:hover,
.project-gallery-item:hover { border-color: var(--accent); }


.contact-form-section {
  margin-top: 2.2rem;
}

.contact-form-section h2,
.contact-form-section > p {
  text-align: center;
}

.contact-form {
  max-width: 760px;
  margin: 1rem auto 0;
  display: grid;
  gap: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  background: rgba(14, 12, 24, 0.6);
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: #0f0d1b;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  justify-self: start;
  border: 1px solid transparent;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #0f0d19;
  padding: 0.55rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.site-footer {
  border-top: 1px solid rgba(138, 125, 255, 0.2);
  text-align: center;
  padding: 1.3rem;
  color: var(--muted);
  margin-top: 2rem;
}

.project-layout { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }
.project-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.project-details { margin-bottom: 1rem; }

#project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.8rem;
}

.project-gallery-item { padding: 0; overflow: hidden; }
.project-gallery-item img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 2, 8, 0.92);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 99;
}

.lightbox.open { display: flex; }
.lightbox-inner { max-width: 95vw; text-align: center; }
.lightbox img { max-width: 95vw; max-height: 88vh; object-fit: contain; cursor: zoom-in; transition: transform 0.25s ease; }
.lightbox img.zoomed { transform: scale(1.22); cursor: zoom-out; }
.lightbox-controls { display: flex; justify-content: center; gap: 0.6rem; margin-top: 0.7rem; }
.cv-section {
  margin: 1.25rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  width: fit-content;
  border: 1px solid rgba(138, 125, 255, 0.25);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(14, 12, 24, 0.6);
  margin: 0 auto;
}

.cv-button {
  justify-self: start;
  border: 1px solid transparent;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #0f0d19;
  padding: 0.55rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.cv-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cv-wrapper {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);

  transition:
    max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease,
    transform 0.4s ease;
}

.cv-wrapper.open {
  max-height: 2000px; /* must exceed PDF height */
  opacity: 1;
  transform: translateY(0);
}

.cv-wrapper iframe {
  width: 100%;
  height: 950px;
  margin-top: 20px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
