/* ───────────────────────────────
   VARIABLES
─────────────────────────────── */
:root {
  --bg:            #ede0ff;
  --bg-alt:        #e4d5f8;
  --white:         #ffffff;
  --border:        #534ab7;
  --border-light:  #afa9ec;
  --purple-nav:    #7f77dd;
  --purple-dark:   #26215c;
  --purple-mid:    #534ab7;
  --purple-muted:  #8b85cc;
  --purple-light:  #afa9ec;
  --text:          #1a1560;
  --text-muted:    #534ab7;
  --text-faint:    #8b85cc;
  --green:         #2a7a2a;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  font-family: 'Courier New', Courier, monospace;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--purple-mid); text-decoration: none; }
a:hover { color: var(--purple-dark); text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ───────────────────────────────
   ANIMATIONS
─────────────────────────────── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

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

@keyframes statusblink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}


/* ───────────────────────────────
   CURSOR
─────────────────────────────── */
.cursor {
  display: inline-block;
  width: 9px;
  height: 1em;
  background: var(--purple-mid);
  vertical-align: text-bottom;
  animation: blink 1s step-start infinite;
  margin-left: 2px;
}

/* ───────────────────────────────
   NAVIGATION / TITLEBAR
─────────────────────────────── */
.nav-titlebar {
  background: var(--purple-mid);
  border-bottom: 2px solid var(--purple-dark);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: stretch;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 8px 0;
  border-right: 1px solid rgba(255,255,255,0.2);
  white-space: nowrap;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}

.nav-icon-sq {
  width: 16px;
  height: 16px;
  background: rgba(255,255,255,0.9);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--purple-mid);
  font-weight: 900;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: stretch;
  margin-left: auto;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  border-left: 1px solid rgba(255,255,255,0.1);
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}

.nav-links a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
}

.nav-winbtns {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 10px;
  border-left: 1px solid rgba(255,255,255,0.15);
}

.winbtn {
  width: 17px;
  height: 15px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
  font-size: 8px;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  user-select: none;
}

.winbtn.close { background: rgba(180,40,40,0.55); }


/* ───────────────────────────────
   LAYOUT
─────────────────────────────── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section {
  padding: 3rem 0;
  animation: fadeup 0.5s ease both;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.9rem;
}

.section-label::before { content: '> '; color: var(--purple-light); }

/* ───────────────────────────────
   PIXEL BOX
─────────────────────────────── */
.pixel-box {
  border: 2px solid var(--border);
  background: var(--white);
  position: relative;
  padding: 1.4rem 1.25rem 1.2rem;
}

.pixel-box-header {
  position: absolute;
  top: -11px;
  left: 12px;
  background: var(--bg);
  padding: 0 7px;
  font-size: 11px;
  font-weight: bold;
  color: var(--purple-mid);
  letter-spacing: 0.07em;
}

/* ───────────────────────────────
   HERO
─────────────────────────────── */
#hero { padding-top: 3rem; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 5px 0;
  border-bottom: 1px dashed #ddd0f8;
  font-size: 13px;
}

.info-row:last-child { border-bottom: none; }

.info-key {
  color: var(--text-muted);
  min-width: 72px;
  flex-shrink: 0;
}

.info-key::after { content: ':'; }

.info-val { color: var(--text); }

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  animation: statusblink 2s ease-in-out infinite;
}

/* About text */
.about-text { font-size: 13px; color: var(--text); }

.about-line {
  padding: 4px 0;
  border-bottom: 1px dashed #ddd0f8;
  line-height: 1.8;
}

.about-line:last-child { border-bottom: none; }

.about-line::before {
  content: '> ';
  color: var(--purple-mid);
  font-weight: bold;
}

/* ───────────────────────────────
   SKILLS
─────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.skill-item {
  padding: 0.65rem 0;
  border-bottom: 1px dashed #ddd0f8;
}

.skill-item:last-child { border-bottom: none; }

.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
}

.skill-name { color: var(--text); font-weight: bold; }
.skill-pct  { color: var(--text-faint); }

.skill-bar-track {
  height: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--purple-mid);
  width: 0;
  transition: width 1.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-blocks {
  font-size: 11px;
  color: var(--purple-muted);
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ───────────────────────────────
   LINKS
─────────────────────────────── */
.links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.link-card {
  border: 2px solid var(--border);
  background: var(--white);
  padding: 1rem;
  display: block;
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.link-card:hover {
  background: var(--purple-mid);
  border-color: var(--purple-dark);
  color: #fff;
  text-decoration: none;
}

.link-card:hover .link-card-tag  { color: rgba(255,255,255,0.6); }
.link-card:hover .link-card-name { color: #fff; }
.link-card:hover .link-card-sub  { color: rgba(255,255,255,0.6); }

.link-card-tag {
  font-size: 10px;
  color: var(--purple-muted);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.link-card-name {
  font-size: 14px;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 3px;
}

.link-card-sub {
  font-size: 11px;
  color: var(--text-faint);
}

/* ───────────────────────────────
   CONTACT
─────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.1rem;
}

.form-field { margin-bottom: 1rem; }

.form-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 5px;
  letter-spacing: 0.05em;
}

.form-label::before { content: '> '; color: var(--purple-light); }

.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 2px solid var(--border-light);
  color: var(--text);
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--purple-mid);
  background: var(--white);
}

.form-textarea { resize: vertical; min-height: 110px; }

.form-submit {
  background: var(--purple-mid);
  color: #fff;
  border: 2px solid var(--purple-dark);
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  font-weight: bold;
  padding: 10px 28px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.12s;
}

.form-submit:hover  { background: var(--purple-dark); }
.form-submit:active { transform: translateY(1px); }

#form-msg {
  margin-top: 10px;
  padding: 8px 12px;
  border: 2px solid;
  font-size: 12px;
  display: none;
}

#form-msg.success { border-color: var(--green); color: var(--green); background: #f0fff0; }
#form-msg.error   { border-color: #990000; color: #990000; background: #fff0f0; }

/* Contact sidebar */
.contact-sidebar { display: flex; flex-direction: column; gap: 1rem; }

.sidebar-links { display: flex; flex-direction: column; gap: 9px; }

.sidebar-links a {
  font-size: 13px;
  color: var(--purple-mid);
  display: flex;
  align-items: center;
  gap: 5px;
}

.sidebar-links a::before { content: '» '; }
.sidebar-links a:hover { color: var(--purple-dark); }

/* Visitor counter box */
.visitor-box {
  border: 2px solid var(--border-light);
  background: var(--white);
  position: relative;
  padding: 1rem;
  text-align: center;
  margin-top: 0.5rem;
}

.visitor-box-header {
  position: absolute;
  top: -10px;
  left: 10px;
  background: var(--bg);
  padding: 0 6px;
  font-size: 10px;
  font-weight: bold;
  color: var(--purple-muted);
  letter-spacing: 0.06em;
}

.visitor-num {
  font-size: 22px;
  font-weight: bold;
  color: var(--purple-mid);
  letter-spacing: 5px;
  margin-top: 0.4rem;
}

.visitor-label {
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 5px;
}

/* ───────────────────────────────
   FOOTER
─────────────────────────────── */
footer {
  background: var(--purple-dark);
  border-top: 2px solid var(--border);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 2rem 1rem;
  font-size: 11px;
}

.footer-star {
  color: var(--purple-light);
  font-size: 13px;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 0.8rem 0;
}

.footer-nav a {
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  text-decoration: none;
}

.footer-nav a:hover { color: rgba(255,255,255,0.9); text-decoration: none; }

.footer-copy { color: rgba(255,255,255,0.3); margin-top: 0.5rem; }

/* ───────────────────────────────
   MOBILE
─────────────────────────────── */
/* ───────────────────────────────
   HAMBURGER BUTTON
─────────────────────────────── */
.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.85);
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  padding: 5px 10px;
  cursor: pointer;
  margin-left: auto;
  margin-right: 8px;
  letter-spacing: 0.02em;
  transition: background 0.1s;
}

.nav-hamburger:hover { background: rgba(255,255,255,0.15); }

/* ───────────────────────────────
   MOBILE
─────────────────────────────── */
@media (max-width: 700px) {
  .hero-grid,
  .skills-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .links-grid   { grid-template-columns: 1fr 1fr; }
  .nav-winbtns  { display: none; }

  /* Hide links by default, show hamburger */
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--purple-mid);
    border-top: 2px solid var(--purple-dark);
    border-bottom: 2px solid var(--purple-dark);
    z-index: 99;
  }

  .nav-links.is-open { display: flex; }

  .nav-links a {
    padding: 12px 18px;
    border-left: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
  }

  .nav-links a:last-child { border-bottom: none; }

  .nav-hamburger { display: flex; align-items: center; }
}

@media (max-width: 420px) {
  .links-grid { grid-template-columns: 1fr; }
}
