/* ============================================================
   PADIL.INK -- style.css
   dark noir + white/silver/parchment accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=IM+Fell+English:ital@0;1&display=swap');

/* -- TOKENS ------------------------------------------------- */
:root {
  --bg:          #0d0d0d;
  --bg-panel:    #111111;
  --bg-card:     #161616;
  --border:      #2a2a2a;
  --border-glow: #888888;
  --text:        #e0ddd8;
  --text-dim:    #545454;
  --accent:      #f2efe9;
  --accent2:     #8c8c8c;
  --accent3:     #c8c4b0;
  --star:        #f5f0da;
  --gold:        #ffd700;

  --font-mono:  'Share Tech Mono', monospace;
  --font-serif: 'IM Fell English', Georgia, serif;

  --fs-xs:   0.78rem;
  --fs-sm:   0.92rem;
  --fs-base: 1.05rem;
  --fs-md:   1.2rem;
  --fs-lg:   1.6rem;
  --fs-xl:   2.2rem;
  --fs-2xl:  3rem;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  line-height: 1.75;
  cursor: crosshair;
  overflow-x: hidden;
}

a {
  color: var(--accent3);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--accent); text-decoration: underline; }

/* -- SCANLINE OVERLAY --------------------------------------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.18) 2px,
    rgba(0,0,0,0.18) 4px
  );
  opacity: 0.3;
}

/* -- SCROLLBAR ---------------------------------------------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-panel); }
::-webkit-scrollbar-thumb { background: var(--accent2); border-radius: 3px; }

/* -- STARS CANVAS ------------------------------------------- */
#stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* -- MOBILE NAV TOGGLE -------------------------------------- */
#mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  line-height: 1;
}

#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 900;
}
#sidebar-overlay.visible { display: block; }

/* -- SPLASH ------------------------------------------------- */
#splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  transition: opacity 0.6s ease;
  cursor: pointer;
}
#splash.hidden { opacity: 0; pointer-events: none; }

.splash-title {
  font-family: var(--font-mono);
  font-size: var(--fs-xl);
  color: var(--accent);
  letter-spacing: 0.12em;
}

.splash-sub {
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.progress-wrap {
  width: 280px;
  border: 1px solid var(--border);
  height: 14px;
  background: var(--bg-card);
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent2);
  transition: width 0.1s linear;
}

.splash-enter {
  font-size: var(--fs-md);
  color: var(--accent3);
  animation: blink 1s step-end infinite;
  display: none;
}
.splash-enter.visible { display: block; }

/* -- SITE WRAP ---------------------------------------------- */
#site-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
}

/* -- SIDEBAR ------------------------------------------------ */
#sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 1.4rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.sidebar-logo { text-align: center; }
.sidebar-logo .sigil {
  font-size: var(--fs-xl);
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.sidebar-logo .site-name {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  letter-spacing: 0.25em;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--border);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.sidebar-nav a {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  padding: 0.3rem 0.5rem;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  letter-spacing: 0.05em;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(242,239,233,0.04);
  text-decoration: none;
}

.widget-box {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 0.7rem;
  font-size: var(--fs-xs);
  line-height: 1.8;
}
.widget-box .widget-title {
  color: var(--accent3);
  font-size: var(--fs-xs);
  letter-spacing: 0.15em;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.2rem;
}
.widget-box .status-dot { color: var(--accent); }
.widget-box .dim { color: var(--text-dim); }
.widget-box .note { color: var(--accent3); }

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: var(--fs-xs);
}
.sidebar-links a { color: var(--text-dim); }
.sidebar-links a:hover { color: var(--accent); text-decoration: none; }

.sidebar-footer {
  margin-top: auto;
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-align: center;
  line-height: 2;
}

/* -- MAIN CONTENT ------------------------------------------- */
#content { padding: 0; }

/* -- SECTION SHARED ----------------------------------------- */
section {
  padding: 4.5rem 3.5rem;
  border-bottom: 1px solid var(--border);
}

.section-heading {
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  color: var(--accent);
  margin-bottom: 2rem;
  letter-spacing: 0.08em;
}
.section-heading::before { content: '* '; color: var(--star); }
.section-heading::after  { content: ' *'; color: var(--star); }

/* -- HERO --------------------------------------------------- */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3.5rem;
  position: relative;
}

.hero-ascii {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.15;
  color: var(--accent2);
  opacity: 0.7;
  margin-bottom: 2rem;
  white-space: pre;
  overflow: hidden;
}

.hero-name {
  font-family: var(--font-mono);
  font-size: var(--fs-xl);
  color: var(--text);
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}

.hero-typed-wrap {
  font-size: var(--fs-md);
  color: var(--accent3);
  height: 1.6em;
  margin-bottom: 1.2rem;
}

.cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--accent2);
}

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-md);
  color: var(--text-dim);
  margin-bottom: 2rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent2);
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.btn:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 14px rgba(242,239,233,0.25);
  text-decoration: none;
}
.btn.secondary {
  color: var(--accent2);
  border-color: var(--accent2);
}
.btn.secondary:hover {
  background: var(--accent2);
  color: var(--bg);
  box-shadow: 0 0 14px rgba(140,140,140,0.35);
  text-decoration: none;
}

/* -- ABOUT -------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 3rem;
  align-items: start;
  margin-bottom: 2rem;
}

.about-text p {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  line-height: 1.9;
  margin-bottom: 1.2rem;
  color: var(--text);
}

.char-card {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  line-height: 1.7;
  border: 1px solid var(--border);
  padding: 0.8rem;
  background: var(--bg-card);
  color: var(--accent3);
  white-space: pre;
  box-shadow: 0 0 16px rgba(200,196,176,0.06);
}

.quick-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-box {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 0.7rem 1rem;
  text-align: center;
  min-width: 120px;
  transition: box-shadow 0.2s;
}
.stat-box:hover { box-shadow: 0 0 14px rgba(200,196,176,0.18); }
.stat-box .stat-val {
  font-size: var(--fs-lg);
  color: var(--accent);
  display: block;
}
.stat-box .stat-label {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

/* -- SKILLS ------------------------------------------------- */
.skill-category { margin-bottom: 1.8rem; }

.skill-cat-label {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  letter-spacing: 0.2em;
  margin-bottom: 0.7rem;
  text-transform: uppercase;
}

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

.skill-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 0.8rem 1rem;
  font-size: var(--fs-sm);
  position: relative;
  transition: box-shadow 0.2s, border-color 0.2s;
  overflow: hidden;
}
.skill-card::before {
  content: '';
  display: block;
  height: 3px;
  margin-bottom: 0.4rem;
  margin-left: -0.8rem;
  margin-right: -0.8rem;
  margin-top: -0.6rem;
}
.skill-card:hover {
  box-shadow: 0 0 12px rgba(200,196,176,0.14);
  border-color: var(--border-glow);
}
.skill-card .skill-tag {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.skill-lang::before  { background: var(--accent); }
.skill-fw::before    { background: var(--accent2); }
.skill-ai::before    { background: var(--accent3); }
.skill-infra::before { background: var(--star); }

/* -- PROJECTS ----------------------------------------------- */
.project-featured {
  border: 1px solid var(--accent3);
  border-left: 4px solid var(--accent3);
  background: var(--bg-card);
  padding: 1.6rem;
  margin-bottom: 1.8rem;
  position: relative;
  box-shadow: 0 0 24px rgba(200,196,176,0.05);
  transition: box-shadow 0.2s;
}
.project-featured:hover {
  box-shadow: 0 0 32px rgba(200,196,176,0.12);
}

.featured-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent2);
  color: var(--bg);
  font-size: var(--fs-xs);
  padding: 0.15rem 0.5rem;
  letter-spacing: 0.1em;
}

.project-featured h3 {
  font-size: var(--fs-md);
  color: var(--accent3);
  margin-bottom: 0.3rem;
  letter-spacing: 0.04em;
}

.project-date {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-bottom: 0.9rem;
}

.project-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-md);
  color: var(--text);
  border-left: 2px solid var(--accent3);
  padding-left: 1rem;
  margin-bottom: 1rem;
}

.project-desc {
  font-size: var(--fs-sm);
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.project-section-label {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  letter-spacing: 0.15em;
  margin-bottom: 0.4rem;
  margin-top: 0.8rem;
  text-transform: uppercase;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tag {
  font-size: var(--fs-xs);
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
a.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.tag.green {
  border-color: var(--accent);
  color: var(--accent);
}
.tag.violet {
  border-color: var(--accent2);
  color: var(--accent2);
}

.role-label {
  display: inline-block;
  font-size: var(--fs-xs);
  color: var(--accent3);
  border: 1px solid var(--accent3);
  padding: 0.15rem 0.5rem;
  margin-top: 0.8rem;
  letter-spacing: 0.1em;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.project-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 1.4rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.project-card:hover {
  box-shadow: 0 0 14px rgba(200,196,176,0.1);
  border-color: var(--border-glow);
}
.project-card h3 {
  font-size: var(--fs-base);
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.project-card .project-desc {
  font-size: var(--fs-sm);
  margin-bottom: 0.8rem;
}

/* -- EXPERIENCE TIMELINE ------------------------------------ */
.timeline {
  border-left: 2px solid var(--border-glow);
  padding-left: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.timeline-item { position: relative; }
.timeline-item::before {
  content: 'o';
  position: absolute;
  left: -2.55rem;
  top: 0;
  color: var(--accent2);
  font-size: var(--fs-base);
  line-height: 1;
}

.tl-date {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
}

.tl-role {
  font-size: var(--fs-base);
  color: var(--text);
  margin-bottom: 0.1rem;
}

.tl-org {
  font-size: var(--fs-sm);
  color: var(--accent3);
}

.tl-desc {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  margin-top: 0.4rem;
  line-height: 1.75;
}

/* -- CONTACT ------------------------------------------------ */
.contact-terminal {
  border: 1px solid var(--border);
  background: var(--bg-card);
  max-width: 520px;
  padding: 2rem;
  transition: box-shadow 0.2s;
}
.contact-terminal:hover {
  box-shadow: 0 0 24px rgba(200,196,176,0.1);
}

.terminal-header {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  letter-spacing: 0.15em;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.contact-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.1rem;
}

.contact-row .contact-label {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  letter-spacing: 0.12em;
  margin-bottom: 0.15rem;
}

.contact-row a {
  font-size: var(--fs-sm);
  color: var(--accent3);
}
.contact-row a:hover { color: var(--accent); }

.contact-cta {
  display: inline-block;
  margin-top: 1rem;
  font-size: var(--fs-sm);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.5rem 1.2rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.contact-cta:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 14px rgba(242,239,233,0.25);
  text-decoration: none;
}

/* -- FOOTER ------------------------------------------------- */
#site-footer {
  padding: 2rem 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-tagline {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  letter-spacing: 0.12em;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.badge-88 {
  display: inline-flex;
  width: 88px;
  height: 31px;
  font-size: 7px;
  font-family: var(--font-mono);
  letter-spacing: 0;
  line-height: 1.1;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: default;
  user-select: none;
  overflow: hidden;
  flex-shrink: 0;
}

.badge-html   { background: #cc3300; color: #fff; }
.badge-nofw   { background: var(--bg-card); color: var(--accent3); border-color: var(--accent3); }
.badge-python { background: #3670A0; color: #FFD43B; }
.badge-ntust  { background: #003082; color: #fff; }
.badge-git    { background: #F05032; color: #fff; }
.badge-linux  { background: #222; color: #FCC624; }

/* -- KONAMI OVERLAY ----------------------------------------- */
#konami-overlay {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9998;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--gold);
  border: 1px solid var(--gold);
  background: var(--bg-card);
  padding: 0.8rem 1.2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  text-align: center;
}
#konami-overlay.show { opacity: 1; }

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

/* -- CURSOR TRAIL ------------------------------------------- */
.trail-glyph {
  position: fixed;
  pointer-events: none;
  font-size: 10px;
  color: var(--accent2);
  z-index: 9997;
  transition: opacity 0.9s ease, transform 0.9s ease;
  user-select: none;
}

/* -- MOBILE ------------------------------------------------- */
@media (max-width: 768px) {
  #mobile-nav-toggle { display: flex; align-items: center; }

  #site-wrap { grid-template-columns: 1fr; }

  #sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100vh;
    width: 240px;
    z-index: 1000;
    transition: left 0.3s ease;
  }
  #sidebar.open { left: 0; }

  section { padding: 2.5rem 1.4rem; }

  .hero-ascii { display: none; }

  #hero { min-height: auto; padding: 3.5rem 1.2rem 2rem; }

  .hero-name { font-size: 1.4rem; }

  .about-grid { grid-template-columns: 1fr; }
  .char-card  { display: none; }

  .quick-stats { gap: 0.6rem; }
  .stat-box { min-width: calc(50% - 0.3rem); flex: 1 0 calc(50% - 0.3rem); }

  .projects-grid { grid-template-columns: 1fr; }

  .skill-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

  .section-heading { font-size: 1.1rem; }

  .badge-row { gap: 0.4rem; }

  #site-footer { padding: 1.5rem 1.2rem; }

  .contact-terminal { max-width: 100%; }
}

/* -- LOG ---------------------------------------------------- */
.log-intro {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  color: var(--text-dim);
  line-height: 1.85;
  margin-bottom: 2.5rem;
  max-width: 640px;
}

.log-entries {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.log-entry {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  font-size: var(--fs-sm);
  border-left: 2px solid var(--border);
  padding: 0.5rem 0 0.5rem 1.2rem;
  transition: border-color 0.2s;
}
.log-entry:hover { border-left-color: var(--border-glow); }

.log-date {
  color: var(--text-dim);
  min-width: 70px;
  font-size: var(--fs-xs);
  flex-shrink: 0;
}

.log-title {
  color: var(--text);
  flex: 1;
}

.log-status {
  color: var(--text-dim);
  font-size: var(--fs-xs);
  white-space: nowrap;
  flex-shrink: 0;
}

.log-pending .log-title { color: var(--text-dim); }
.log-pending:hover .log-title { color: var(--text); transition: color 0.2s; }

/* -- LEARNING ----------------------------------------------- */
.learn-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 1.6rem;
  max-width: 640px;
  transition: box-shadow 0.2s;
}
.learn-card:hover { box-shadow: 0 0 14px rgba(200,196,176,0.1); }

.learn-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.6rem;
}
.learn-topic { font-size: var(--fs-md); color: var(--accent); }
.learn-link  { font-size: var(--fs-xs); color: var(--accent3); flex-shrink: 0; }

.learn-desc {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.learn-bar-wrap {
  height: 3px;
  background: var(--border);
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.learn-bar {
  height: 100%;
  background: var(--accent2);
  transition: width 1s ease;
}

.learn-meta {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

/* -- BASED PEOPLE ------------------------------------------- */
.based-list { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.4rem; }
.based-entry {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.based-entry:hover { color: var(--accent); }

/* -- SPOTIFY WRAP ------------------------------------------- */
.spotify-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.spotify-wrap::-webkit-scrollbar { display: none; }

/* -- BASED NOTES -------------------------------------------- */
.based-person { display: flex; flex-direction: column; gap: 0.25rem; }
.based-note {
  font-family: var(--font-serif);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0;
  font-style: italic;
}
