:root {
  --bg: #0f0a1e;
  --bg2: #150826;
  --card: #1c1033;
  --card-border: #2d1b52;
  --text: #f2eefb;
  --muted: #b3a8cf;
  --red: #ff2a3c;
  --coral: #f24843;
  --gold: #ffb020;
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Nav */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 10, 30, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-border);
}
nav { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { font-size: 22px; font-weight: 800; letter-spacing: 0.5px; text-decoration: none; }
.logo b { color: var(--red); }
.nav-links { display: flex; gap: 26px; list-style: none; align-items: center; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 600; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-cta {
  background: var(--red); color: #fff !important; padding: 8px 16px;
  border-radius: 999px; font-size: 14px;
}
.nav-cta:hover { background: var(--coral); }
@media (max-width: 720px) {
  .nav-links { gap: 16px; }
  .nav-links li:nth-child(2) { display: none; }
}
/* Mobile: keep the site header inside 360px viewports (logo + links
 * together overflowed and forced the whole page wider than the phone). */
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .logo { font-size: 18px; }
  nav { gap: 10px; }
  .nav-links { gap: 10px; min-width: 0; }
  .nav-links li:nth-child(1), .nav-links li:nth-child(3) { display: none; }
  .nav-cta { padding: 8px 12px; white-space: nowrap; }
  section { padding: 36px 0; }
  .page-head { padding: 36px 0 8px; }
}

/* Hero */
.hero { padding: 84px 0 64px; text-align: center; }
.hero .eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gold);
  border: 1px solid #4a3410; background: #241a05;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1.08; font-weight: 800; }
.hero h1 span { color: var(--red); }
.hero p.lead { max-width: 640px; margin: 20px auto 0; color: var(--muted); font-size: 18px; }
.hero .btns { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 12px 24px; border-radius: 999px;
}
button.btn { border: none; cursor: pointer; font: inherit; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--coral); }
.btn-ghost { border: 1px solid var(--card-border); color: var(--text); background: var(--card); }
.btn-ghost:hover { border-color: var(--red); }
.hero .meta { margin-top: 26px; color: var(--muted); font-size: 14px; }
.hero .meta svg { vertical-align: -3px; margin-right: 5px; }

/* Sections */
section { padding: 56px 0; }
section h2 { font-size: 30px; font-weight: 800; margin-bottom: 8px; }
section h2::after {
  content: ""; display: block; width: 48px; height: 4px;
  background: var(--red); border-radius: 2px; margin-top: 10px;
}
section .sub { color: var(--muted); margin-bottom: 28px; max-width: 640px; }
.page-head { padding: 56px 0 8px; }
.page-head h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 800; }
.page-head h1 span { color: var(--red); }
.page-head p { color: var(--muted); margin-top: 10px; max-width: 640px; }
.center { text-align: center; }
.center .btn { margin-top: 8px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
@media (max-width: 720px) { .about-grid { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 24px;
}
.about p { color: var(--muted); margin-bottom: 14px; }
.about p strong { color: var(--text); }
.fact-list { list-style: none; }
.fact-list li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--card-border); font-size: 15px;
}
.fact-list li:last-child { border-bottom: none; }
.fact-list span { color: var(--muted); }
.fact-list b { font-weight: 600; text-align: right; }

/* Skills */
.skill-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.skill-groups h3 { font-size: 17px; margin-bottom: 12px; color: var(--gold); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.tags li {
  font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: var(--bg2); border: 1px solid var(--card-border); color: var(--text);
}

/* Projects */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.project { display: flex; flex-direction: column; }
.project .badge {
  display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  margin-bottom: 12px;
}
.badge-android { background: #12351f; color: #4ade80; border: 1px solid #1f5c33; }
.badge-web { background: #0e2a4a; color: #7cc4ff; border: 1px solid #1d4e89; }
.badge-yt { background: #3d0d12; color: #ff8089; border: 1px solid #7a1d24; }
.badge-store { background: #2a1a05; color: #ffcf5c; border: 1px solid #6b4d0e; }
.project h3 { font-size: 20px; margin-bottom: 6px; }
.project p { color: var(--muted); font-size: 15px; flex: 1; }
.project .tech { margin: 14px 0; }
.project .tech li { font-size: 12.5px; }
.project .links { display: flex; gap: 16px; align-items: center; margin-top: 6px; }
.project .links a { color: var(--red); font-weight: 700; font-size: 14px; text-decoration: none; }
.project .links a:hover { text-decoration: underline; }
.project .status { color: var(--muted); font-size: 14px; }

/* Channel */
.channel {
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(135deg, #14261a, #1c1033);
}
.channel .play {
  flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%;
  background: var(--red); display: flex; align-items: center; justify-content: center;
}
.channel h3 { font-size: 22px; }
.channel p { color: var(--muted); margin-top: 6px; max-width: 560px; }
.channel .btn { margin-top: 14px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; }
.contact-item:hover { border-color: var(--red); }
.contact-item .icon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 10px;
  background: var(--bg2); border: 1px solid var(--card-border);
  display: flex; align-items: center; justify-content: center; color: var(--red);
}
.contact-item h3 { font-size: 16px; margin-bottom: 2px; }
.contact-item p { color: var(--muted); font-size: 14.5px; word-break: break-all; }

/* Form */
.form-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 720px) { .form-wrap { grid-template-columns: 1fr; } }
.form-card form { display: grid; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--card-border); background: var(--bg2);
  color: var(--text); font: inherit; font-size: 15px;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); }
.field textarea { min-height: 150px; resize: vertical; }
.form-note { color: var(--muted); font-size: 13.5px; }
.side-note p { color: var(--muted); margin-bottom: 14px; font-size: 15px; }
.side-note p strong { color: var(--text); }

footer {
  border-top: 1px solid var(--card-border); padding: 28px 0 36px;
  color: var(--muted); font-size: 14px; text-align: center;
}
footer b { color: var(--text); }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); text-decoration: underline; }

/* Project images (uploaded via admin) */
.project-img {
  width: 100%; max-height: 220px; object-fit: cover;
  border-radius: 10px; margin-bottom: 14px; border: 1px solid var(--card-border);
}

/* Admin */
.admin-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 12px;
}
.admin-row-actions { flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; }
.btn-danger { background: #7a1d24; color: #ff8089; border: 1px solid #a12730; }
.btn-danger:hover { background: #8f232c; color: #ffb3b8; }
.inbox-item p { color: var(--muted); font-size: 15px; }
.form-card select {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--card-border); background: var(--bg2);
  color: var(--text); font: inherit; font-size: 15px;
}
.form-card input[type="file"] { color: var(--muted); }
.form-card input[type="checkbox"] { accent-color: var(--red); }

/* Mobile hero: .page-head's padding shorthand overrides .wrap's side
 * padding (same specificity, later rule wins), so the heading sat flush
 * against the viewport edge whenever the container spans the full width
 * (any viewport below the 1160px max-width). Restore side padding. */
@media (max-width: 1160px) {
  .page-head { padding-left: 16px; padding-right: 16px; }
}
