/* Global theme and layout */
:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: rgba(255, 0, 0, 0.08);
  --surface-strong: rgba(255, 0, 0, 0.16);
  --text: #ffffff;
  --muted: #cccccc;
  --accent: #ff0000;
  --accent-strong: #ff4444;
  --border: rgba(255, 0, 0, 0.3);
  --shadow: 0 24px 80px rgba(255, 0, 0, 0.2);
  --gradient: linear-gradient(135deg, rgba(255, 0, 0, 0.18), rgba(0, 0, 0, 0.9));
}

[data-theme="light"] {
  --bg: #eaf8ff;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --text: #0f2140;
  --muted: #5f8fb2;
  --accent: #4faeff;
  --accent-strong: #0f3a66;
  --border: rgba(79, 174, 255, 0.18);
  --shadow: 0 24px 80px rgba(66, 110, 151, 0.12);
  --gradient: linear-gradient(135deg, rgba(140, 205, 255, 0.22), rgba(255,255,255,0.98));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: radial-gradient(circle at top, rgba(255,0,0,0.05), transparent 25%), var(--bg);
  color: var(--text);
  min-height: 100vh;
}

button, input, textarea, a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 26px;
  background: rgba(10, 34, 58, 0.82);
  backdrop-filter: blur(22px);
  border: 1px solid rgba(103, 199, 255, 0.15);
  border-radius: 28px;
  box-shadow: 0 20px 55px rgba(0, 20, 44, 0.24);
}

.brand {
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.nav-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent-strong);
  transform: translateY(-2px);
}

.theme-btn {
  padding: 10px 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.theme-btn:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  color: var(--accent);
}

.section-heading span {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 2.4vw, 2.8rem);
}

.section-fade {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease forwards;
}

.section-fade:nth-of-type(1) { animation-delay: 0.15s; }
.section-fade:nth-of-type(2) { animation-delay: 0.25s; }
.section-fade:nth-of-type(3) { animation-delay: 0.35s; }
.section-fade:nth-of-type(4) { animation-delay: 0.45s; }
.section-fade:nth-of-type(5) { animation-delay: 0.55s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 112px);
  padding-top: 32px;
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 18px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--accent);
  font-size: 0.82rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.2rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.role {
  margin: 18px 0 12px;
  font-size: 1.1rem;
  color: var(--text);
}

.role span {
  display: inline-block;
  margin-left: 12px;
  font-size: 0.92rem;
  color: var(--muted);
}

.tagline {
  max-width: 620px;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 16px 26px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.08));
  border-color: rgba(255,255,255,0.16);
  color: var(--text);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-strong);
  border-color: var(--accent);
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
}

.avatar-frame {
  width: min(420px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(145deg, rgba(255,255,255,0.22), rgba(255,255,255,0));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 30px 80px rgba(0,0,0,0.24);
}

.circle-frame {
  border-radius: 50%;
}

.avatar-shape {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 22%),
              radial-gradient(circle at 80% 20%, rgba(173, 176, 191, 0.14), transparent 16%),
              linear-gradient(180deg, rgba(29, 31, 40, 0.95), rgba(10, 12, 20, 0.98));
  overflow: hidden;
}

.avatar-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.16), transparent 34%);
}

.hero-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  position: relative;
}

.avatar-illustration,
.avatar-illustration svg {
  display: none;
}

.avatar-illustration::before,
.avatar-illustration::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
}

.avatar-illustration::before {
  width: 52%;
  height: 48%;
  top: 8%;
  left: 12%;
  background: rgba(255,255,255,0.12);
  filter: blur(10px);
}

.avatar-illustration::after {
  width: 36%;
  height: 30%;
  bottom: 10%;
  right: 14%;
  background: rgba(255,255,255,0.1);
  filter: blur(14px);
}

.visual-tag {
  margin-top: 20px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.about,
.projects,
.skills,
.contact {
  padding: 80px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 32px;
  align-items: start;
}

.about-text {
  padding: 28px;
  border-radius: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.about-text p {
  line-height: 1.9;
  color: var(--muted);
}

.fun-card {
  position: relative;
  overflow: hidden;
}

.fun-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.12), transparent 30%);
  pointer-events: none;
}

.fun-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  color: var(--text);
}

.fun-item span {
  font-size: 1.35rem;
  line-height: 1;
}

.intro {
  font-size: 1.05rem;
  color: var(--text);
}

.personal-list {
  margin-top: 26px;
  display: grid;
  gap: 12px;
  color: var(--accent);
}

.hobbies-section {
  margin-top: 32px;
}

.hobbies-section h3 {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 1.1rem;
}

.hobby-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.hobby-card {
  padding: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.hobby-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  margin-bottom: 16px;
  font-size: 1.4rem;
}

.hobby-card h4 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.hobby-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.info-card {
  padding: 24px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.info-card, .hobby-card, .project-card, .idea-card {
  border: 2px solid var(--accent) !important;
  background: linear-gradient(135deg, var(--surface), rgba(255, 0, 0, 0.1)) !important;
}

.info-card h3 {
  margin-top: 0;
  margin-bottom: 16px;
}

.info-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.info-card ul li {
  color: var(--text);
}

.accent-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  justify-content: center;
  max-width: 1080px;
  margin: 0 auto;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
}

.project-image {
  min-height: 240px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-image-1 {
  background-image: radial-gradient(circle at top left, rgba(255,255,255,0.12), transparent 24%),
    linear-gradient(135deg, rgba(82, 92, 128, 0.95), rgba(16, 18, 29, 0.95));
}

.project-image-2 {
  background-image: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.14), transparent 18%),
    linear-gradient(135deg, rgba(19, 21, 36, 0.95), rgba(39, 48, 80, 0.9));
}

.project-image-3 {
  background-image: radial-gradient(circle at 20% 40%, rgba(255,255,255,0.12), transparent 18%),
    linear-gradient(135deg, rgba(44, 52, 72, 0.95), rgba(11, 13, 22, 0.95));
}

.project-copy {
  padding: 24px;
}

.project-copy h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.project-copy p {
  line-height: 1.8;
  color: var(--muted);
}

.project-role {
  margin: 18px 0 0;
  font-size: 0.95rem;
  color: var(--text);
}

.project-link {
  display: inline-flex;
  margin-top: 20px;
  color: var(--accent-strong);
  font-weight: 600;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.skill-panel {
  padding: 24px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.skill-panel h3 {
  margin-top: 0;
  margin-bottom: 16px;
}

.skill-bar {
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.skill-level {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(207,206,217,0.72));
  box-shadow: 0 0 20px rgba(255,255,255,0.12);
  animation: fillBar 1.5s ease forwards;
}

@keyframes fillBar {
  from { width: 0; }
}

.skill-value {
  display: block;
  margin-top: 12px;
  color: var(--accent);
}

.card-skill p {
  color: var(--muted);
  line-height: 1.8;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 32px;
}

.contact-info {
  display: grid;
  gap: 24px;
}

.contact-intro {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.9;
}

.contact-list {
  display: grid;
  gap: 12px;
  color: var(--accent);
}

.contact-card {
  padding: 24px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.contact-form {
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.12);
}

.footer {
  margin-top: 40px;
  padding: 36px 0 12px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero,
  .about-grid,
  .project-grid,
  .skills-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 20px 18px 32px;
  }

  .topbar {
    flex-wrap: wrap;
    justify-content: center;
  }

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

  .hero h1 {
    font-size: clamp(2.8rem, 10vw, 4rem);
  }

  .project-grid,
  .skills-grid {
    gap: 18px;
  }

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

@media (max-width: 520px) {
  .hero-actions,
  .nav-links {
    justify-content: center;
  }

  .project-card {
    border-radius: 24px;
  }

  .contact-form {
    padding: 22px;
  }
}

#ideas {
  margin-top: 60px;
}

.ideas-content {
  max-width: 800px;
  margin: 0 auto;
}

.idea-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.idea-card h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.idea-card p {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.idea-card img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  margin-top: 20px;
}
