@font-face {
  font-family: "Default";
  src: url("PTSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #111113;
  --surface: #1a1a1f;
  --surface-2: #222228;
  --border: rgba(255, 255, 255, 0.07);
  --text: #e8e8ed;
  --text-muted: #888894;
  --accent-a: #6ee7f7;
  --accent-b: #7cf78a;
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Default", sans-serif;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  padding: 2rem 0;
  animation: fadeIn 0.6s ease forwards;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

/* grain overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 100;
}

body>img {
  border-radius: 50%;
  width: 90px;
  height: 90px;
  object-fit: cover;
  border: 2px solid var(--border);
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow);
}

h1.title {
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  overflow: visible;
  line-height: 1.2;
  margin: 0.2em 0 0.5em;
}

.title span {
  display: inline-block;
  opacity: 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation-duration: 0.7s;
  animation-timing-function: ease;
  animation-fill-mode: forwards;
  animation-delay: calc((var(--i) - 1) * 0.15s);
}

.title :nth-child(odd) {
  animation-name: titleUp;
}

.title :nth-child(even) {
  animation-name: titleDown;
}

.title :nth-child(1) {
  --i: 1;
  background-image: linear-gradient(to right, #6ee7f7, #70e4f0);
}

.title :nth-child(2) {
  --i: 2;
  background-image: linear-gradient(to right, #70e1ea, #72dee2);
}

.title :nth-child(3) {
  --i: 3;
  background-image: linear-gradient(to right, #74dbd9, #77d8d1);
}

.title :nth-child(4) {
  --i: 4;
  background-image: linear-gradient(to right, #79d5c8, #7cd2c0);
}

.title :nth-child(5) {
  --i: 5;
  background-image: linear-gradient(to right, #7ecfb7, #81ccae);
}

.title :nth-child(6) {
  --i: 6;
  background-image: linear-gradient(to right, #84c9a5, #88c69c);
}

.title :nth-child(7) {
  --i: 7;
  background-image: linear-gradient(to right, #8bc393, #8fc08a);
}

.title :nth-child(8) {
  --i: 8;
  background-image: linear-gradient(to right, #92bd81, #96ba78);
}

.title :nth-child(9) {
  --i: 9;
  background-image: linear-gradient(to right, #99b76f, #9db466);
}

.title :nth-child(10) {
  --i: 10;
  background-image: linear-gradient(to right, #a0b15d, #7cf78a);
}

/* Tabslify Release Banner */
.release-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 440px;
  margin: 0.2rem 1.2rem 1.3rem;
  padding: 1.1rem 1.3rem;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(120deg, var(--accent-a), var(--accent-b)) border-box;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow), 0 0 26px rgba(110, 231, 247, 0.12);
  overflow: hidden;
  opacity: 0;
  animation: fadeIn 1.2s ease 0.9s forwards;
  transition: transform var(--transition), box-shadow var(--transition);
}

.release-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 50% -20%, rgba(124, 247, 138, 0.14), transparent 60%);
  pointer-events: none;
}

.release-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 34px rgba(124, 247, 138, 0.22);
}

.release-badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  color: var(--bg);
  background: linear-gradient(120deg, var(--accent-a), var(--accent-b));
  font-weight: 700;
}

.release-title {
  font-size: clamp(1.3rem, 4.5vw, 1.7rem);
  line-height: 1.15;
  background: linear-gradient(to right, var(--accent-a), var(--accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0.1rem 0;
}

.release-text {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0;
}

.release-cta {
  margin-top: 0.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-a);
  transition: color var(--transition);
}

.release-banner:hover .release-cta {
  color: var(--accent-b);
}

.center {
  max-width: 400px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  padding: 0 1.2rem;
  margin-bottom: 1.4rem;
}

.center p {
  opacity: 0;
  animation: fadeIn 1.8s ease 1.8s forwards;
}

/* Buttons */
#projekte-btn,
#skills-btn,
#contributions-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1.1rem;
  padding: 0.7em 1.8em;
  cursor: pointer;
  margin: 0.35rem;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow);
  letter-spacing: 0.02em;
}

#projekte-btn:hover,
#skills-btn:hover,
#contributions-btn:hover {
  background: #2a2a32;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

/* Close Buttons */
#close-projekte,
#close-skills,
#close-contributions {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0.6em 1.6em;
  cursor: pointer;
  margin: 1.5rem 0 1rem;
  transition: var(--transition);
}

#close-projekte:hover,
#close-skills:hover,
#close-contributions:hover {
  color: var(--text);
  background: #2a2a32;
}

/* Frames */
#projekt-frame,
#skills-frame,
#contributions-frame {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  transition: opacity 0.5s ease;
  overflow-y: auto;
  background: #111113;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  padding: 1.5rem 1rem;
  overflow-y: auto;
}

#projekt-frame h1,
#skills-frame h1,
#contributions-frame h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 1.2rem 0 1.6rem;
  background: linear-gradient(to right, var(--accent-a), var(--accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#skills-frame details {
  width: 100%;
  max-width: 640px;
  margin-bottom: 0.8rem;
}

#skills-frame summary {
  padding: 0.95em 1.45em;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.05rem;
  list-style: none;
  transition: all var(--transition);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

#skills-frame summary:hover {
  background: var(--surface-2);
  border-color: rgba(255, 255, 255, 0.16);
}

#skills-frame summary::after {
  content: "▼";
  font-size: 0.88em;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#skills-frame details[open] summary::after {
  transform: rotate(180deg);
}

/* Der Inhalts-Container mit smoother Animation */
#skills-frame details>div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 1.4em;
}

/* Geöffneter Zustand */
#skills-frame details[open]>div {
  max-height: 500px;
  /* ausreichend hoch für deinen Inhalt */
  opacity: 1;
  padding: 0.8em 1.4em;
  margin-top: -1px;
}

#skills-frame p {
  color: var(--text-muted);
  padding: 0.8em 1.4em;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  text-align: left;
}

iframe {
  width: 100%;
  height: 80%;
  border: none;
}

/* Animations */
@keyframes titleUp {
  0% {
    opacity: 0;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-16px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes titleDown {
  0% {
    opacity: 0;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(16px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Contributions styling */
.contributions-container {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contribution-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: left;
  transition: transform var(--transition), background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.contribution-card:hover {
  background: var(--surface-2);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.contribution-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.contribution-repo a {
  font-size: 0.85rem;
  color: var(--accent-a);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.contribution-repo a:hover {
  color: var(--accent-b);
}

.contribution-badges {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.contribution-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
  border: 1px solid transparent;
}

/* Badges for PR / Issue type */
.contribution-badge.type-pr {
  background: rgba(110, 231, 247, 0.1);
  border-color: var(--accent-a);
  color: var(--accent-a);
}

.contribution-badge.type-issue {
  background: rgba(247, 186, 110, 0.1);
  border-color: #f7ba6e;
  color: #f7ba6e;
}

/* Badges for Status */
.contribution-badge.status-open {
  background: rgba(124, 247, 138, 0.1);
  border-color: var(--accent-b);
  color: var(--accent-b);
}

.contribution-badge.status-merged {
  background: rgba(163, 112, 255, 0.1);
  border-color: #a370ff;
  color: #a370ff;
}

.contribution-badge.status-closed {
  background: rgba(255, 99, 99, 0.1);
  border-color: #ff6363;
  color: #ff6363;
}

.contribution-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 700;
}

.contribution-title a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}

.contribution-title a:hover {
  color: var(--accent-a);
}

.contribution-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.contribution-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.6rem;
}

.contribution-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.contribution-label {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 500;
  border: 1px solid transparent;
}

.contribution-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.contributions-loading,
.contributions-error {
  padding: 2rem;
  font-size: 1rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.contributions-error button {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.5em 1.2em;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
}

.contributions-error button:hover {
  background: #2a2a32;
  color: var(--accent-a);
}
