/* ── CSS VARIABLES ── */
:root {
  --bg: #050a0f;
  --bg2: #0b1420;
  --accent: #00e5ff;
  --accent2: #7b2fff;
  --gold: #f5c842;
  --text: #e8f4f8;
  --muted: #6b8a99;
  --card: #0d1f2d;
  --border: rgba(0, 229, 255, 0.15);
  --glow: 0 0 24px rgba(0, 229, 255, 0.25);
}

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* ── BODY ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  overflow-x: hidden;
  cursor: default;
}

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 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.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

/* ── GRID BACKGROUND ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
}

/* ── NAVIGATION ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: rgba(5, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.nav-logo span {
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 48px 80px;
  position: relative;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.orb1 {
  width: 500px;
  height: 500px;
  background: rgba(0, 229, 255, 0.07);
  top: -100px;
  right: -100px;
}

.orb2 {
  width: 400px;
  height: 400px;
  background: rgba(123, 47, 255, 0.08);
  bottom: -100px;
  left: 200px;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 80px;
}

/* ── PHOTO ── */
.photo-wrap {
  flex-shrink: 0;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: var(--glow), inset 0 0 40px rgba(0, 229, 255, 0.05);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.3s;
}

.photo-wrap:hover {
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.45);
}

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

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  text-align: center;
  padding: 20px;
}

.photo-placeholder svg {
  opacity: 0.5;
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 229, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.photo-wrap:hover .photo-overlay {
  opacity: 1;
}

#photoInput {
  display: none;
}

/* ── HERO TEXT ── */
.hero-text {
  flex: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-tag::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent);
}

h1 {
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

h1 .name-accent {
  color: var(--accent);
}

.hero-sub {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-sub strong {
  color: var(--gold);
  font-weight: 400;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  padding: 6px 16px;
  border-radius: 99px;
  border: 1px solid var(--border);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  background: rgba(0, 229, 255, 0.05);
}

/* ── SECTIONS ── */
section {
  padding: 100px 48px;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  margin-bottom: 48px;
}

/* ── ABOUT GRID ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.info-card:hover {
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: var(--glow);
}

.info-card-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.info-card-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  min-width: 10px;
}

.info-card-value[contenteditable="true"]:focus {
  border-bottom: 1px dashed var(--accent);
  color: var(--accent);
}

.info-card-value[contenteditable="true"]::after {
  content: ' ✎';
  font-size: 11px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.2s;
}

.info-card:hover .info-card-value[contenteditable="true"]::after {
  opacity: 1;
}

/* ── HOBBIES ── */
#hobbies {
  background: var(--bg2);
}

.hobbies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.hobby-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: default;
}

.hobby-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: var(--glow);
}

.hobby-icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: block;
}

.hobby-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.add-hobby {
  background: transparent;
  border: 1px dashed rgba(0, 229, 255, 0.3);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  transition: border-color 0.2s, color 0.2s;
}

.add-hobby:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── CONTACT ── */
#contact {
  background: var(--bg2);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.contact-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.contact-info {
  flex: 1;
}

.contact-info label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.contact-info span {
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.contact-info span[contenteditable="true"]:focus {
  border-bottom: 1px dashed var(--accent);
  color: var(--accent);
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 40px;
  border-top: 1px solid var(--border);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 10, 15, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: 400px;
  transform: translateY(16px);
  transition: transform 0.3s;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal h3 {
  font-size: 20px;
  margin-bottom: 20px;
}

.modal input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  margin-bottom: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.modal input:focus {
  border-color: var(--accent);
}

.modal-btns {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.btn-primary {
  flex: 1;
  padding: 12px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-ghost {
  flex: 1;
  padding: 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--muted);
}

/* ── ANIMATIONS ── */
.fade-in {
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
}

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

.d1 { animation-delay: 0.1s; }
.d2 { animation-delay: 0.2s; }
.d3 { animation-delay: 0.3s; }
.d4 { animation-delay: 0.4s; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  .nav-links { display: none; }
  #hero { padding: 100px 20px 60px; }
  .hero-inner { flex-direction: column; gap: 40px; align-items: flex-start; }
  .photo-wrap { width: 160px; height: 160px; }
  section { padding: 70px 20px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}
