:root {
  --bg-main: #0a0a0a;
  --bg-panel: rgba(22, 22, 22, 0.85);
  --bg-panel-alt: rgba(46, 46, 46, 0.4);
  --accent: #d8d8d8;
  --accent-gradient: linear-gradient(135deg, #d8d8d8, #6e6e6e);
  --accent-soft: rgba(216, 216, 216, 0.08);
  --text: #d8d8d8;
  --text-muted: #6e6e6e;
  --border: rgba(255, 255, 255, 0.06);
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
  --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.9);
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  background: var(--bg-main);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(216, 216, 216, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 50% 30% at 80% 90%, rgba(216, 216, 216, 0.02) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

body::after {
  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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
}

.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

header {
  max-width: 1100px;
  margin: auto;
  padding: 4rem 2rem 2rem;
}

.header-container {
  padding: 3rem;
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.header-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 0% 50%, rgba(216, 216, 216, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.profile-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2px solid rgba(216, 216, 216, 0.08);
  padding: 4px;
  background: #0a0a0a;
  box-shadow:
    0 0 0 1px rgba(216, 216, 216, 0.04),
    0 15px 50px rgba(0, 0, 0, 0.8);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  object-fit: cover;
  filter: grayscale(0.3) contrast(1.1);
}

.profile-photo:hover {
  transform: scale(1.03);
  box-shadow:
    0 0 0 1px rgba(216, 216, 216, 0.15),
    0 20px 60px rgba(0, 0, 0, 0.9);
  filter: grayscale(0) contrast(1);
}

.header-info h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
}

.header-info p {
  color: var(--text-muted);
  margin-top: 1rem;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 600px;
  font-weight: 300;
  letter-spacing: 0.01em;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding-top: 2.5rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.nav-links a:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.section {
  padding: 4rem 3rem;
  max-width: 1000px;
  margin: 4rem auto;
  text-align: left;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.section-header .line {
  height: 1px;
  flex-grow: 1;
  background: linear-gradient(90deg, var(--border), transparent);
}

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
}

.skill {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 0.8rem;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.skill i {
  font-size: 2rem;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: grayscale(0.4);
}

.skill:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(216, 216, 216, 0.15);
  background: rgba(46, 46, 46, 0.6);
  color: var(--text);
}

.skill:hover i {
  transform: scale(1.1);
  filter: grayscale(0);
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.project::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at top right, rgba(216, 216, 216, 0.04), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.project:hover {
  transform: translateY(-4px);
  border-color: rgba(216, 216, 216, 0.12);
  box-shadow: var(--shadow-strong);
}

.project:hover::before {
  opacity: 1;
}

.project h3 {
  font-size: 1.15rem;
  margin: 0 0 0.8rem 0;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.project h3 i {
  color: var(--text-muted);
}

.project p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  font-size: 0.9rem;
  font-weight: 300;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.project-tags span {
  font-size: 0.8rem;
  padding: 0.25rem 0.7rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
}

.project-links a:hover {
  color: var(--text);
}

.loading-spinner {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 1.2rem;
  grid-column: 1 / -1;
}

.loading-spinner i {
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

footer {
  text-align: center;
  padding: 3rem 1rem;
  color: #4d4d4d;
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  font-weight: 300;
}

footer a {
  color: #6e6e6e;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--text);
}

@media (max-width: 768px) {
  .header-container {
    padding: 2rem;
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .section {
    padding: 3rem 1.5rem;
    margin: 2rem 1rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .projects {
    grid-template-columns: 1fr;
  }

  .profile-photo {
    width: 140px;
    height: 140px;
  }

  .skills {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.8rem;
  }
}
