:root {
  --bg: #000000;
  --bg-alt: #0a0a0a;
  --glass: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.26);
  --text: #ffffff;
  --muted: #cfcfcf;
  --accent: #ffffff;
  --accent-2: #d9d9d9;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 0%, #171717 0%, var(--bg) 40%), var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent), var(--accent-2));
  border-radius: 999px;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.1;
}

.bg-orb {
  position: fixed;
  width: 42vw;
  aspect-ratio: 1;
  filter: blur(80px);
  border-radius: 50%;
  opacity: 0.2;
  pointer-events: none;
  animation: float 8s ease-in-out infinite alternate;
}

.orb-1 { background: #ffffff; top: -12vw; left: -10vw; }
.orb-2 { background: #8c8c8c; bottom: -20vw; right: -14vw; animation-delay: 2s; }

.touch-meteor {
  position: fixed;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #dcdcdc 42%, rgba(255, 255, 255, 0.28) 70%, rgba(255, 255, 255, 0) 100%);
  transform: translate(-50%, -50%);
  z-index: 2;
  opacity: 0;
  transition: opacity 0s linear;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.85), 0 0 34px rgba(255, 255, 255, 0.42);
}

.touch-meteor::before {
  content: "";
  position: absolute;
  width: 56px;
  height: 12px;
  top: 50%;
  right: 50%;
  transform: translate(14px, -50%);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.8));
  filter: blur(1px);
  border-radius: 999px;
}

.touch-meteor.active {
  opacity: 1;
}


.section {
  width: min(1180px, 92vw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 24px 60px rgba(0, 0, 0, 0.72);
}

.top-nav {
  margin-top: 1.25rem;
  border-radius: 20px;
  padding: 0.9rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand { font-family: "Syne", sans-serif; letter-spacing: 0.08em; font-size: 0.85rem; }
.nav-link { color: var(--text); text-decoration: none; }

.hero { min-height: 100vh; padding-bottom: 4rem; }
.hero-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.2rem;
  align-items: center;
}

.kicker { color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.82rem; }
h1 { font-family: "Syne", sans-serif; font-size: clamp(2.8rem, 8vw, 6rem); margin: 0.5rem 0; }
.subtitle { font-weight: 500; color: #e5e5e5; animation: pulse 2.5s ease-in-out infinite; }
.lead { color: var(--muted); max-width: 56ch; line-height: 1.7; }

.cta-row { display: flex; gap: 0.9rem; margin-top: 1.4rem; flex-wrap: wrap; }
.btn {
  text-decoration: none;
  color: #000000;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 0.35s ease;
}
.btn-primary { background: linear-gradient(120deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 28px rgba(255, 255, 255, 0.35); }
.btn-ghost { color: #ffffff; border-color: var(--line); background: rgba(255, 255, 255, 0.06); }
.btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 24px rgba(255, 255, 255, 0.2); }

.hero-portrait {
  border-radius: 32px;
  padding: 0.75rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.12));
}
.hero-portrait img {
  margin: 0;
}
.hero-portrait img {
  display: block;
  width: 100%;
  border-radius: 26px;
  max-height: 76vh;
}

.about, .social, .gallery, .footer { padding: 2rem 0 0; }
.about-card { border-radius: 28px; padding: 2rem; }
.about-card h2, .social h2, .gallery h2 { font-family: "Syne", sans-serif; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.about-card p { color: var(--muted); line-height: 1.7; max-width: 68ch; }

.skill-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.7rem;
}
.skill-grid span {
  padding: 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 0.92rem;
}

.social-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.9rem; }
.social-btn {
  color: var(--text);
  text-decoration: none;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  transition: 0.3s ease;
}
.social-btn::before {
  content: "";
  position: absolute;
  inset: -120%;
  background: conic-gradient(from 30deg, transparent 0deg, rgba(255,255,255,0.75) 120deg, transparent 220deg);
  transition: 0.5s ease;
}
.social-btn:hover::before { inset: -20%; }
.social-btn:hover { box-shadow: 0 0 26px rgba(255, 255, 255, 0.32); transform: translateY(-2px); }

.masonry {
  columns: 1;
  column-gap: 1rem;
  margin-top: 1.4rem;
}
.gallery-item {
  position: relative;
  margin: 0 0 1rem;
  border-radius: 18px;
  overflow: hidden;
  break-inside: avoid;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.45s ease-in-out;
}
.gallery-item.loading { min-height: 220px; }
.gallery-item.loaded { animation: revealUp 0.6s ease forwards; }
.gallery-item.fade-switch img { opacity: 0; }

.gallery-item {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.gallery-item:focus,
.gallery-item:focus-visible {
  outline: none;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.7);
}
.gallery-item.fade-switch,
.gallery-item.fade-switch:focus,
.gallery-item.fade-switch:focus-visible {
  box-shadow: none;
}

.error { color: #ffffff; border: 1px solid #ffffff; padding: 1rem; border-radius: 12px; }

.floating-toggle-hint {
  position: fixed;
  bottom: 0.9rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.67rem;
  letter-spacing: 0.03em;
  color: #f1f1f1;
  z-index: 6;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.footer-note {
  margin: 0.8rem auto 0;
  max-width: 58ch;
  font-size: 0.74rem;
  line-height: 1.55;
  color: #bdbdbd;
}
.footer { text-align: center; color: var(--muted); padding-bottom: 3rem; }
.signature { font-family: "Syne", sans-serif; color: var(--text); }

.reveal { opacity: 0; transform: translateY(26px); transition: 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.12s; }

@media (min-width: 700px) { .masonry { columns: 2; } }
@media (min-width: 1024px) {
  .masonry {
    columns: unset;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .gallery-item {
    margin: 0;
  }
}

@media (max-width: 900px) {
  .section { width: min(1180px, 94vw); }
  .floating-toggle-hint {
    width: max-content;
    max-width: calc(100vw - 1.2rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    bottom: 0.7rem;
  }

  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 1.35rem; }
  .hero-copy { padding: 0.25rem 0.25rem 0; }
  .hero-portrait {
    order: 0;
    border-radius: 28px;
    padding: 0.65rem;
  }
}

@keyframes float {
  from { transform: translateY(-14px) translateX(-6px); }
  to { transform: translateY(12px) translateX(8px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
                   }

.floating-toggle-hint {
  left: auto;
  right: 0.9rem;
  transform: none;
  bottom: 0.9rem;
  max-width: 58vw;
  text-align: center;
}


@media (max-width: 720px) {
  .floating-toggle-hint {
    max-width: 78vw;
  }
}
