/* ============================================================
   whoami — stylesheet
   ============================================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:        #fdfbf7;
  --fg:        #2d2d2d;
  --muted:     #e5e0d8;
  --accent:    #ff4d4d;
  --blue:      #2d5da1;
  --border:    #2d2d2d;
  --white:     #ffffff;
  --yellow:    #fff9c4;

  --r1: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --r2: 15px 225px 15px 255px / 225px 15px 255px 15px;

  --shadow:    4px 4px 0px 0px #2d2d2d;
  --shadow-sm: 2px 2px 0px 0px #2d2d2d;
  --shadow-lg: 8px 8px 0px 0px #2d2d2d;
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(var(--muted) 1px, transparent 1px);
  background-size: 24px 24px;
  font-family: 'Patrick Hand', cursive;
  color: var(--fg);
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Kalam', cursive;
  font-weight: 700;
}

/* ── NAV ─────────────────────────────────────────────────── */
nav {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Kalam', cursive;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -1px;
}
.logo span { color: var(--accent); }

nav ul { list-style: none; display: flex; gap: 2rem; }

nav ul li a {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
  position: relative;
}
nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 100%; height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .15s;
}
nav ul li a:hover::after { transform: scaleX(1); }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  max-width: 900px;
  margin: 3rem auto 0;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.hero-text h1 em { color: var(--accent); font-style: normal; }
.hero-text p  { font-size: 1.25rem; max-width: 500px; margin-bottom: 2rem; line-height: 1.6; }

.hero-img {
  width: 220px; height: 220px;
  border-radius: var(--r1);
  border: 3px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: var(--yellow);
  overflow: hidden;
  transform: rotate(2deg);
  position: relative;
  flex-shrink: 0;
}
.hero-img img    { width: 100%; height: 100%; object-fit: cover; }
.hero-img .no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 5rem;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .75rem 2rem;
  cursor: pointer;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.2rem;
  background: var(--white);
  color: var(--fg);
  border: 3px solid var(--border);
  border-radius: var(--r1);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: all .1s;
  user-select: none;
}
.btn:hover   { background: var(--accent); color: var(--white); box-shadow: var(--shadow-sm); transform: translate(2px, 2px); }
.btn:active  { box-shadow: none; transform: translate(4px, 4px); }
.btn-secondary       { background: var(--muted); }
.btn-secondary:hover { background: var(--blue); color: var(--white); }

/* ── SECTIONS ────────────────────────────────────────────── */
section {
  max-width: 900px;
  margin: 5rem auto 0;
  padding: 0 1.5rem;
}

.section-label {
  display: inline-block;
  background: var(--yellow);
  border: 2px solid var(--border);
  border-radius: var(--r2);
  padding: .2rem 1rem;
  font-family: 'Kalam', cursive;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  transform: rotate(-1deg);
  margin-bottom: 1rem;
}

section h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: .5rem; }

.divider {
  border: none;
  border-top: 2px dashed var(--muted);
  margin: 1.5rem 0;
}

/* ── ABOUT ───────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: transform .1s, box-shadow .1s;
}
.card:hover { transform: rotate(1deg); box-shadow: var(--shadow-lg); }
.card h3    { margin-bottom: .5rem; font-size: 1.4rem; }
.card p     { font-size: 1rem; line-height: 1.6; }

/* ── SKILLS ──────────────────────────────────────────────── */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}

.skill-tag {
  background: var(--muted);
  border: 2px solid var(--border);
  border-radius: var(--r1);
  padding: .35rem 1rem;
  font-family: 'Patrick Hand', cursive;
  font-size: 1rem;
  box-shadow: 3px 3px 0 var(--border);
}

/* ── PROJECTS ────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.project-card {
  background: var(--white);
  border: 3px solid var(--border);
  border-radius: var(--r1);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform .1s, box-shadow .1s;
}
.project-card:hover { transform: rotate(-1deg) translateY(-2px); box-shadow: var(--shadow-lg); }

.project-card .tag {
  display: inline-block;
  background: var(--yellow);
  border: 1.5px solid var(--border);
  border-radius: var(--r2);
  padding: .1rem .6rem;
  font-size: .85rem;
  margin-bottom: .75rem;
}
.project-card h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.project-card p  { font-size: .95rem; line-height: 1.5; margin-bottom: 1rem; }

.tape {
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 60px; height: 20px;
  background: rgba(200, 200, 200, .5);
  border: 1px solid rgba(0, 0, 0, .1);
}

/* ── CONTACT ─────────────────────────────────────────────── */
.contact-box {
  background: var(--white);
  border: 3px solid var(--border);
  border-radius: var(--r2);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  margin-top: 1.5rem;
  text-align: center;
}
.contact-box p { font-size: 1.2rem; margin-bottom: 1.5rem; }

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  max-width: 900px;
  margin: 4rem auto 0;
  padding: 1.5rem;
  border-top: 2px dashed var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .95rem;
  color: var(--fg);
}
#footer-name { font-family: 'Kalam', cursive; }

/* ── ADMIN LOGIN OVERLAY ─────────────────────────────────── */
#login-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(45, 45, 45, .85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#login-overlay.show { display: flex; }

.login-box {
  background: var(--bg);
  border: 3px solid var(--border);
  border-radius: var(--r1);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  width: 360px;
  position: relative;
}
.login-box h2    { font-size: 1.8rem; margin-bottom: 1.5rem; text-align: center; }
.login-box label { display: block; margin-bottom: .25rem; font-size: .95rem; }
.login-box input {
  width: 100%;
  padding: .6rem 1rem;
  margin-bottom: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--r2);
  font-family: 'Patrick Hand', cursive;
  font-size: 1rem;
  background: var(--white);
  outline: none;
}
.login-box input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45, 93, 161, .15); }

.login-error {
  color: var(--accent);
  font-size: .9rem;
  margin-bottom: .75rem;
  display: none;
}

.close-login {
  position: absolute;
  top: .75rem; right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  font-family: 'Kalam', cursive;
}

/* ── DASHBOARD ───────────────────────────────────────────── */
#dashboard {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  overflow-y: auto;
}

.dash-nav {
  background: var(--white);
  border-bottom: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 10;
}
.dash-nav h1 { font-size: 1.5rem; }

.dash-body {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
}

.dash-sidebar ul              { list-style: none; }
.dash-sidebar ul li           { margin-bottom: .5rem; }
.dash-sidebar ul li button {
  width: 100%;
  text-align: left;
  background: none;
  border: 2px solid transparent;
  border-radius: var(--r2);
  padding: .5rem 1rem;
  font-family: 'Patrick Hand', cursive;
  font-size: 1rem;
  cursor: pointer;
  transition: .1s;
}
.dash-sidebar ul li button:hover,
.dash-sidebar ul li button.active {
  background: var(--yellow);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.dash-panel        { display: none; }
.dash-panel.active { display: block; }
.dash-panel h2 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px dashed var(--muted);
  padding-bottom: .5rem;
}

.form-row               { margin-bottom: 1.25rem; }
.form-row label         { display: block; font-size: .9rem; margin-bottom: .25rem; color: var(--fg); }
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: .6rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--r2);
  font-family: 'Patrick Hand', cursive;
  font-size: 1rem;
  background: var(--white);
  outline: none;
}
.form-row textarea          { min-height: 100px; resize: vertical; }
.form-row input:focus,
.form-row textarea:focus    { border-color: var(--blue); }

.save-btn {
  background: var(--fg);
  color: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--r1);
  padding: .5rem 1.5rem;
  font-family: 'Patrick Hand', cursive;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: .1s;
}
.save-btn:hover { background: var(--blue); transform: translate(1px, 1px); box-shadow: none; }

.project-item {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--r2);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.project-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
}

.del-btn {
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--r2);
  padding: .25rem .75rem;
  cursor: pointer;
  font-family: 'Patrick Hand', cursive;
  font-size: .85rem;
}

.skill-dash-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}
.skill-dash-tag {
  background: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: var(--r1);
  padding: .2rem .75rem;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.skill-dash-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
}

.add-row       { display: flex; gap: .5rem; margin-bottom: 1rem; }
.add-row input { flex: 1; }

.section-toggle   { display: flex; flex-direction: column; gap: .75rem; }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--r2);
  box-shadow: var(--shadow-sm);
}
.toggle-row label { font-size: 1rem; }

input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--blue); }

.preview-link { color: var(--blue); font-size: .85rem; text-decoration: none; margin-left: .5rem; }
.preview-link:hover { text-decoration: underline; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero                  { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-img              { width: 160px; height: 160px; margin: 0 auto; }
  .about-grid,
  .projects-grid         { grid-template-columns: 1fr; }
  .dash-body             { grid-template-columns: 1fr; }
  .dash-sidebar          { display: flex; overflow-x: auto; gap: .5rem; }
  .dash-sidebar ul       { display: flex; gap: .5rem; }
  nav ul                 { gap: 1rem; }
}
