/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

/* ==========================================================================
   Custom CLI-themed styles (green accents, rounded corners)
   ========================================================================== */
:root{
  --bg-1: #04110a; /* very dark green */
  --bg-2: #0b1a13; /* medium green for visible gradient */
  --card: rgba(7, 22, 16, 0.7);
  --accent: #39ff8a; /* bright green */
  --text: #cfeee0;
  --muted: #8fae98;
  --radius: 12px;

}

html{
  min-height:100vh;
  background: linear-gradient(180deg,var(--bg-1) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
}

body{
  min-height:100vh;
  margin:0;
  color:var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  padding:48px 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.loaded {
  opacity: 1;
}

.site-header{ display:flex; justify-content:center; align-items:center; margin-bottom:20px; }
.site-brand h1{ margin:0; color:var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Courier New', monospace; font-size:2rem; letter-spacing:0.6px; }
.site-title-link { color: inherit; text-decoration: none; }
.site-brand .muted{ margin:4px 0 0 0; color:var(--muted); font-size:0.95rem; }

.site-main{ display:flex; justify-content:center; align-items:flex-start; }
.card{ width:100%; max-width:960px; background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border-radius:var(--radius); padding:18px; box-shadow: 0 12px 40px rgba(0,0,0,0.6); border:1px solid rgba(60,180,120,0.06); }

.terminal{ background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.35)); padding:18px; border-radius:calc(var(--radius) - 6px); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Courier New', monospace; font-size:0.98rem; line-height:1.6; color:var(--text); border:1px solid rgba(0,0,0,0.6); }

.line{ display:block; margin-bottom:8px; }
.prompt{ color:var(--accent); font-weight:700; margin-right:8px; }
.cmd{ color:#d8ffe6; }
.output{ color:var(--muted); margin-left:18px; margin-bottom:6px; }

.output.list, ul.list{ margin:6px 0 12px 0; padding-left:20px; }
ul.list{ list-style:none; }
ul.list li{ position:relative; padding-left:12px; margin:6px 0; }
ul.list li::before{ content:'●'; color:var(--accent); position:absolute; left:0; top:0; font-size:0.8em; }

.project-list .proj{ background: rgba(0,0,0,0.15); border-radius:10px; padding:10px 12px; margin:8px 0; color:var(--text); border:1px solid rgba(255,255,255,0.02); }

.project-list .proj a{ color:var(--accent); text-decoration:none; font-weight:600; }
.project-list .proj a:hover, .project-list .proj a:focus{ text-decoration:underline; }

.card-footer{ margin-top:14px; padding-top:10px; border-top:1px dashed rgba(255,255,255,0.03); }

.site-footer{ text-align:center; margin-top:20px; color:var(--muted); }

/* Language selector styles */
.lang-selector{ display:flex; gap:8px; align-items:center; margin-left:auto; }
.lang-link{ color:var(--muted); text-decoration:none; background: rgba(255,255,255,0.02); padding:6px 8px; border-radius:8px; border:1px solid rgba(255,255,255,0.03); font-weight:600; font-family:inherit; font-size:0.85rem; }
.lang-link:hover, .lang-link:focus{ color:var(--text); background: rgba(57,255,138,0.04); border-color: rgba(57,255,138,0.06); outline:none; }
.lang-link.active{ color:var(--accent); background: rgba(57,255,138,0.06); box-shadow: 0 6px 18px rgba(3,20,10,0.35); }
.lang-selector .sep{ color: rgba(255,255,255,0.06); margin:0 6px; }

@media (max-width:600px){
  .site-brand h1{ font-size:1.4rem; }
  body{ padding:24px 12px; }
  .terminal{ padding:14px; }
}

@media (max-width:640px){
  .lang-selector{ gap:6px; }
  .lang-link{ padding:5px 7px; font-size:0.8rem; }
}

/* Small focus style for accessibility */
a:focus, button:focus, .cmd:focus{ outline:2px solid rgba(57,255,138,0.16); outline-offset:3px; border-radius:6px; }

/* Back button styling */
.back-button {
  display: inline-block;
  color: #39ff8a;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 20px;
  border: 4px solid #39ff8a;
  border-radius: 25px;
  background-color: transparent;
  transition: all 0.3s ease;
  position: relative;
}

.back-button:hover {
  background-color: #00ffa24f;
  color: #0b1410;
  transform: translateX(-5px);
}

.back-button::before {
  content: '←';
  font-size: 1.2em;
  margin-right: 8px;
}
