:root {
  --primary: #7be86c;
  --text: #f4f7fb;
  --muted: #cdd7f1;
  --bg: #10172a;
  --overlay: rgba(16, 23, 42, 0.55);
  --card-bg: rgba(21, 29, 48, 0.88);
  --card-border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 50px rgba(5, 10, 25, 0.45);
  --radius-lg: 40px;
  --radius-md: 28px;
  --radius-sm: 18px;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

html {
  font-size: clamp(16px, 2vw, 20px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Tektur", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(120deg, #10172a 0%, #1e2746 100%);
  animation: bg-move 16s ease-in-out infinite alternate;
  position: relative;
  overflow-x: hidden;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

@keyframes bg-move {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 16px;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: #111827;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease;
  z-index: 999;
}

.skip-link:focus {
  left: 16px;
  transform: translateY(0);
}

.bg-image {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  filter: brightness(0.6) blur(3px);
  z-index: 0;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 70px),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 70px);
  animation: pattern-move 18s linear infinite alternate;
  z-index: 1;
}

@keyframes pattern-move {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 70px 70px, 70px 70px;
  }
}

.hero {
  position: relative;
  z-index: 2;
  width: min(1100px, 92vw);
  margin: clamp(2.5rem, 6vw, 4.5rem) auto 0;
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: var(--radius-lg);
  background: var(--overlay);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 6vw, 3.5rem);
  align-items: center;
}

.hero__visual {
  display: flex;
  justify-content: center;
}

.hero__image-frame {
  width: clamp(260px, 32vw, 360px);
  aspect-ratio: 5 / 6;
  display: grid;
  place-items: center;
  background: #fff;
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s ease;
}

.hero__image-frame:hover,
.hero__image-frame:focus-within {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 0 0 10px rgba(123, 232, 108, 0.35), 0 25px 45px rgba(0, 0, 0, 0.25);
}

.hero__image {
  width: 92%;
  height: 92%;
  object-fit: cover;
  object-position: center top;
  clip-path: inherit;
}

.hero__content h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--primary) 10%, #ffffff 50%, var(--primary) 90%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-move 4s linear infinite alternate;
}

.hero__content h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 500;
  color: var(--muted);
}

@keyframes gradient-move {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.hero__bio {
  font-size: clamp(1.05rem, 2.3vw, 1.2rem);
  color: var(--muted);
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.main-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.main-btn {
  background: #ffffff;
  color: #16203a;
  box-shadow: 0 15px 35px rgba(123, 232, 108, 0.35);
}

.main-btn:hover,
.main-btn:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(123, 232, 108, 0.45);
}

.secondary-btn {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

.secondary-btn:hover,
.secondary-btn:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

.icon-btn {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.2s ease, background 0.2s ease;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  transform: translateY(-4px);
  background: #ffffff;
}

.icon-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.main-content {
  position: relative;
  z-index: 2;
  width: min(1100px, 92vw);
  margin: clamp(2rem, 5vw, 3.5rem) auto clamp(4rem, 8vw, 5rem);
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

.section-title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: 2.5rem 0 1rem;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 600;
}

.project-stream {
  padding: clamp(1.75rem, 3vw, 2.25rem);
  background: rgba(13, 20, 36, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 1.25rem;
  box-shadow: 0 18px 38px rgba(6, 10, 24, 0.28);
}

.project-stream__header {
  display: grid;
  gap: 0.65rem;
}

.project-stream__title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.6rem);
}

.project-stream__meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.98rem;
  line-height: 1.7;
}

@media (min-width: 720px) {
  .project-stream__header {
    grid-template-columns: 1fr minmax(0, 320px);
    align-items: start;
    gap: 1.25rem;
  }

  .project-stream__meta {
    text-align: right;
  }
}

.github-projects {
  margin-top: clamp(2rem, 5vw, 3rem);
}

.github-status {
  margin: 0 0 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.github-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.github-item {
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 0.75rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.github-item[data-source="github"] {
  border-color: rgba(123, 232, 108, 0.2);
}

.github-item[data-source="fallback"] {
  border-style: dashed;
}

.github-item:hover,
.github-item:focus-within {
  transform: translateY(-2px);
  border-color: rgba(123, 232, 108, 0.35);
}

.github-item__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.github-item__title {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.github-item__title:hover,
.github-item__title:focus {
  color: var(--primary);
}

.github-item__demo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(123, 232, 108, 0.15);
  border: 1px solid rgba(123, 232, 108, 0.35);
  color: var(--primary);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.github-item__demo:hover,
.github-item__demo:focus {
  background: rgba(123, 232, 108, 0.25);
  color: #102a12;
  border-color: rgba(123, 232, 108, 0.55);
}

.github-item__description {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

.github-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.github-topics li {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(123, 232, 108, 0.12);
  border: 1px solid rgba(123, 232, 108, 0.32);
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.github-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.github-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.github-meta__item span[aria-hidden="true"] {
  font-size: 0.9rem;
}

.github-item--empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  font-style: italic;
}

@media (max-width: 640px) {
  .github-item__title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .github-item__demo {
    align-self: flex-start;
  }
}

.github-fallback {
  margin-top: 1.25rem;
  color: rgba(255, 255, 255, 0.6);
}

.github-fallback a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.github-fallback a:hover,
.github-fallback a:focus {
  text-decoration: underline;
}

.card-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: 0 12px 35px rgba(10, 14, 30, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card--nested {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.card--nested:hover,
.card--nested:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(123, 232, 108, 0.18);
}

.card:hover,
.card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 18px 42px rgba(123, 232, 108, 0.2);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: clamp(1.2rem, 3vw, 1.4rem);
}

.card p {
  margin: 0 0 1rem;
  color: var(--muted);
}


.skills-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.skills-list li {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.spotify-section iframe {
  border-radius: 18px;
  width: 100%;
  min-height: 360px;
  border: none;
}

.contact-section {
  display: grid;
  gap: 1.25rem;
}

.contact-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__content {
    display: grid;
    justify-items: center;
  }

  .cta-group {
    justify-content: center;
  }
}

@media (max-width: 720px) {
  body {
    animation: none;
  }

  .bg-pattern {
    animation: none;
    opacity: 0.35;
  }

  .hero,
  .card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .hero__image-frame {
    width: clamp(220px, 60vw, 280px);
  }

  .spotify-section iframe {
    min-height: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .bg-pattern,
  .hero__image-frame,
  .card,
  .main-btn,
  .secondary-btn,
  .icon-btn {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
