
/*
 * defaultbehaviors.
 * Main Stylesheet
 * ------------------------------------------
 * 01. Theme & Variables
 * 02. Reset & Global
 * 03. Buttons & Inputs
 * 04. Layout & Navigation
 * 05. Hero & Profile
 * 06. Social Media
 * 07. Sections & Directory
 * 08. Posts & Gallery
 * 09. Moon Widget
 * 10. Terminal
 * 11. Footer
 * 12. Admin Dashboard
 * 13. Responsive Design
 */


/* ==========================================
   01. THEME & VARIABLES
   ========================================== */

:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;

  color-scheme: dark;

  --bg: #0c0d0f;
  --card: #181a1e;
  --card2: #22252a;

  --text: #f3f4f6;
  --muted: #9ca3af;

  --line: #34383f;
  --accent: #8be5a4;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;

  --transition: 0.2s ease;
}

body.light {
  color-scheme: light;

  --bg: #f5f5f2;
  --card: #ffffff;
  --card2: #eaece8;

  --text: #202327;
  --muted: #626a73;

  --line: #dadeda;
  --accent: #217d45;
}


/* ==========================================
   02. RESET & GLOBAL
   ========================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  min-height: 100vh;

  background: var(--bg);
  color: var(--text);

  transition:
    background var(--transition),
    color var(--transition);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img,
svg {
  max-width: 100%;
}

img {
  display: block;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hide {
  display: none !important;
}

.muted {
  color: var(--muted);
}


/* ==========================================
   03. BUTTONS & FORM CONTROLS
   ========================================== */

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 11px 15px;

  background: var(--card2);
  color: var(--text);

  border: 1px solid var(--line);
  border-radius: 12px;

  transition:
    background var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

button:hover,
.btn:hover {
  border-color: var(--accent);
}

button:active,
.btn:active {
  transform: scale(0.98);
}

button.primary,
.btn.primary {
  background: var(--accent);
  color: var(--bg);

  border-color: transparent;
  font-weight: 700;
}

body.light button.primary,
body.light .btn.primary {
  color: #ffffff;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input,
textarea,
select {
  width: 100%;
  padding: 11px;

  background: var(--bg);
  color: var(--text);

  border: 1px solid var(--line);
  border-radius: var(--radius-sm);

  outline: none;

  transition: border-color var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

label {
  display: block;
  margin: 14px 0 6px;

  font-size: 13px;
  color: var(--muted);
}


/* ==========================================
   04. LAYOUT & NAVIGATION
   ========================================== */

.wrap {
  width: 100%;
  max-width: 1060px;

  margin-inline: auto;
  padding-inline: 22px;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;

  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 70px;
  gap: 12px;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.07em;
  white-space: nowrap;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navlinks a {
  font-size: 13px;
  color: var(--muted);

  transition: color var(--transition);
}

.navlinks a:hover {
  color: var(--text);
}

#theme {
  display: grid;
  place-items: center;

  width: 42px;
  height: 42px;
  padding: 0;

  font-size: 20px;
  flex-shrink: 0;
}


/* ==========================================
   05. HERO & PROFILE
   ========================================== */

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  align-items: center;

  gap: 32px;
  padding: 80px 0 54px;
}

.pill {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;

  font-size: 12px;
  letter-spacing: 0.1em;

  color: var(--accent);
}

.hero h1 {
  margin: 18px 0 22px;

  font-size: clamp(42px, 7vw, 86px);
  font-weight: 800;

  line-height: 0.98;
  letter-spacing: -0.08em;

  overflow-wrap: anywhere;
  white-space: pre-line;
}

.hero p {
  max-width: 570px;

  color: var(--muted);
  line-height: 1.7;
}

.avatar,
.avatarplaceholder {
  width: 100%;
  max-width: 230px;
  aspect-ratio: 1;

  border: 1px solid var(--line);
  border-radius: 50%;

  background: var(--card);
}

.avatar {
  object-fit: cover;
}

.avatarplaceholder {
  display: grid;
  place-items: center;

  font-size: 86px;
  color: var(--muted);

  background: radial-gradient(
    circle at 30% 30%,
    var(--card2),
    var(--card)
  );
}


/* ==========================================
   06. SOCIAL MEDIA BUTTONS
   ========================================== */

.social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;

  gap: 10px;
  margin-top: 25px;
}

.social .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 10px;
  padding: 11px 15px;

  background: var(--card);
  color: var(--text);

  border: 1px solid var(--line);
  border-radius: 100px;

  font-size: 13px;

  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.social .social-link:hover {
  transform: translateY(-3px);

  border-color: var(--accent);
  background: var(--card2);
}

.social .social-icon,
.social .social-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}

.social .social-icon svg {
  display: block;

  width: 20px;
  height: 20px;
}

.social .social-label {
  font-weight: 600;
  text-transform: capitalize;
}

.social .social-arrow {
  opacity: 0.65;
}

.social .social-arrow svg {
  display: block;

  width: 13px;
  height: 13px;
}


/* ==========================================
   07. SECTIONS & DIRECTORY
   ========================================== */

.section {
  padding: 25px 0 35px;
  scroll-margin-top: 90px;
}

.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;
  margin-bottom: 22px;
}

.section h2 {
  margin: 0;

  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.folders {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 14px;
}

.folder {
  display: flex;
  flex-direction: column;

  gap: 8px;
  min-width: 0;
  padding: 23px;

  background: var(--card);

  border: 1px solid var(--line);
  border-radius: var(--radius-md);

  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.folder:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--card2);
}

.folder .symbol {
  font-size: 30px;
  line-height: 1.3;
}

.folder strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.folder small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}


/* ==========================================
   08. POSTS & GALLERY
   ========================================== */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 15px;
}

.card {
  min-width: 0;
  overflow: hidden;

  background: var(--card);

  border: 1px solid var(--line);
  border-radius: 17px;

  transition:
    transform var(--transition),
    border-color var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.card img {
  display: block;

  width: 100%;
  aspect-ratio: 4 / 3;

  object-fit: cover;
}

.card .inner {
  padding: 18px;
}

.card h3 {
  margin: 6px 0 8px;

  font-size: 18px;
  line-height: 1.4;
}

.card p {
  margin: 8px 0;

  font-size: 14px;
  line-height: 1.6;

  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tag {
  font-family:
    ui-monospace,
    Consolas,
    monospace;

  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  color: var(--accent);
}

.card .date {
  font-size: 12px;
  color: var(--muted);
}

.card a.more {
  display: inline-block;
  margin-top: 9px;

  font-size: 13px;
  font-weight: 600;

  color: var(--accent);
}

.card a.more:hover {
  text-decoration: underline;
}

.empty {
  grid-column: 1 / -1;

  padding: 35px;

  border: 1px dashed var(--line);
  border-radius: var(--radius-md);

  color: var(--muted);
  line-height: 1.6;
}


/* ==========================================
   09. MOON WIDGET
   ========================================== */

.moonbox {
  display: flex;
  align-items: center;

  gap: 20px;
  padding: 22px;

  background: var(--card);

  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.moon {
  font-size: 46px;
  line-height: 1;
  flex-shrink: 0;
}

.moonbox strong {
  display: block;

  font-size: 17px;
  margin-bottom: 6px;
}

.moonbox p {
  font-size: 14px;
  line-height: 1.6;
}


/* ==========================================
   10. INTERACTIVE TERMINAL
   ========================================== */

.terminal {
  padding: 22px;

  background: var(--card);

  border: 1px solid var(--line);
  border-radius: 15px;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;

  font-size: 13px;
  line-height: 1.9;

  overflow-wrap: anywhere;
}

.prompt {
  color: var(--accent);
}

.terminal > div {
  margin-bottom: 10px;
}

.terminal label {
  display: flex;
  align-items: center;

  gap: 7px;
  margin: 5px 0;
}

.terminal input {
  width: 100%;
  min-width: 0;

  padding: 0;

  background: transparent;
  color: var(--text);

  border: 0;
  border-radius: 0;

  outline: none;
  font: inherit;
}

.terminal input:focus {
  border: 0;
}

#termout {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}


/* ==========================================
   11. FOOTER
   ========================================== */

footer {
  margin-top: 65px;
  padding: 28px 0;

  border-top: 1px solid var(--line);

  color: var(--muted);
  font-size: 12px;
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;
}

footer a {
  white-space: nowrap;

  transition: color var(--transition);
}

footer a:hover {
  color: var(--accent);
}


/* ==========================================
   12. ADMIN DASHBOARD
   ========================================== */

.adminlayout {
  width: 100%;
  max-width: 1000px;

  margin: 36px auto;
  padding: 0 20px;
}

.panel {
  margin: 18px 0;
  padding: 22px;

  background: var(--card);

  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.panel h2 {
  margin-top: 0;
  letter-spacing: -0.03em;
}

.panel p {
  line-height: 1.6;
}

.formgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  column-gap: 16px;
}

.formgrid > * {
  min-width: 0;
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 10px;
}

.adminitem {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;
  padding: 13px 0;

  border-bottom: 1px solid var(--line);
}

.adminitem:last-child {
  border-bottom: 0;
}

.adminitem > div {
  min-width: 0;
}

.adminitem strong {
  display: block;
  overflow-wrap: anywhere;
}

.adminitem small {
  color: var(--muted);
  line-height: 1.5;
}

.status {
  min-height: 20px;

  font-size: 13px;
  color: var(--accent);
}


/* ==========================================
   13. RESPONSIVE DESIGN
   ========================================== */

/* Tablets and smaller screens */

@media (max-width: 700px) {

  .navlinks a {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;

    gap: 36px;
    padding-top: 48px;
  }

  .hero .avatar,
  .avatarplaceholder {
    width: 140px;
    height: 140px;
    max-width: 140px;
  }

  .cards,
  .folders {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .adminlayout {
    margin-top: 24px;
  }
}


/* Mobile phones */

@media (max-width: 440px) {

  .wrap {
    padding-inline: 20px;
  }

  .logo {
    font-size: 21px;
  }

  .hero {
    gap: 32px;
  }

  .hero h1 {
    font-size: clamp(42px, 11vw, 60px);
  }

  .hero p {
    font-size: 15px;
  }

  .social {
    gap: 9px;
  }

  .social .social-link {
    gap: 8px;
    padding: 11px 13px;
  }

  .social .social-icon svg {
    width: 18px;
    height: 18px;
  }

  .social .social-label {
    font-size: 13px;
  }

  .section h2 {
    font-size: 25px;
  }

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

  .folders {
    gap: 9px;
  }

  .folder {
    padding: 17px;
  }

  .folder strong {
    font-size: 14px;
  }

  .moonbox {
    padding: 18px;
    gap: 15px;
  }

  .moon {
    font-size: 38px;
  }

  .terminal {
    padding: 18px;
    font-size: 12px;
  }

  .panel {
    padding: 18px;
  }

  .adminitem {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topline {
    align-items: flex-start;
  }
}


/* Accessibility: reduced motion */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
