/*
Theme Name: oiler-art
Description: A minimal custom WordPress theme featuring a code editor hero section with typewriter animation
Version: 1.0
Author: oiler.art
*/

/* Base Reset */
body {
    margin: 0;
    padding: 0;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.site-main {
    margin: 0;
    padding: 0;
}

/* Portfolio Header */
.portfolio-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #3e3e42;
    z-index: 1000;
    padding: 1rem 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    flex: 1;
}

.site-logo {
    font-family: 'Fira Code', 'Courier New', 'Monaco', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: #4ec9b0;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

.site-logo:hover {
    color: #6bcfb8;
}

.header-nav {
    display: flex;
    gap: 0.55rem;
    align-items: center;
}

.nav-link {
    color: #b7c0c9;
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    line-height: 0;
}

.nav-link:hover {
    color: #4ec9b0;
    background: rgba(78, 201, 176, 0.12);
}

.nav-link:focus-visible {
    outline: none;
    color: #4ec9b0;
    background: rgba(78, 201, 176, 0.16);
    box-shadow: 0 0 0 2px rgba(78, 201, 176, 0.45);
}

.nav-link svg {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
}

/* Hero Section */
.portfolio-hero {
    min-height: calc(100vh - 72px);
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: center;
    justify-content: flex-start;
    background: #1e1e1e;
    padding: 7.5rem 2rem 2rem;
    margin: 0;
    box-sizing: border-box;
}

.editor-module {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.hero-heading {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: #6fb3a8;
    opacity: 0.9;
    margin-bottom: 0.55rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}


.site-footer {
    border-top: 1px solid #3e3e42;
    background: #1e1e1e;
    padding: 1rem 2rem 1.5rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-copy {
    color: #818c98;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
}

/* Code Editor */
.code-editor {
    max-width: 900px;
    width: 100%;
    background: #252526;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.editor-header {
    background: #2d2d30;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #3e3e42;
}

.editor-buttons {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.btn.close {
    background: #4a9eff;
    transition: background 0.2s ease;
}

.btn.close:hover {
    background: #2d7dd2;
}

.btn.minimize {
    background: #808080;
    transition: background 0.2s ease;
}

.btn.minimize:hover {
    background: #5a5a5a;
}

.btn.maximize {
    background: #4ec9b0;
    transition: background 0.2s ease;
}

.btn.maximize:hover {
    background: #3ba895;
}

.editor-title {
    color: #cccccc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
}

.code-container {
    background: #1e1e1e;
    padding: 1.5rem;
    margin: 0;
    overflow-x: auto;
}

.code-display {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    overflow: visible;
}

.code-display code {
    font-family: 'Fira Code', 'Courier New', 'Monaco', monospace;
    font-size: 1rem;
    line-height: 1.8;
    display: block;
    color: #d4d4d4;
    font-weight: 400;
}

/* Typewriter Animation Buffer */
.oilerart-buffer {
    color: #ce9178 !important;
    font-weight: 400;
    position: relative;
    display: inline;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Prism.js theme overrides for better code editor look */
.token.keyword {
    color: #569cd6;
    font-weight: 500;
}

.token.class-name {
    color: #4ec9b0;
    font-weight: 500;
}

.token.function {
    color: #dcdcaa;
}

.token.string {
    color: #ce9178;
}

.token.variable {
    color: #9cdcfe;
}

.token.operator {
    color: #858585;
}

.token.punctuation {
    color: #858585;
}

/* PHP tags and delimiters - <?php and ?> */
.token.delimiter {
    color: #569cd6;
    font-weight: 500;
}

/* Enhanced visual hierarchy for code structure */
.code-display code {
    position: relative;
    letter-spacing: 0.01em;
}

/* Improve indentation clarity */
.code-display pre {
    tab-size: 4;
    -moz-tab-size: 4;
}

/* Enhanced visibility for braces and parentheses - subtle but clear */
code.language-php .token.punctuation {
    color: #858585;
    opacity: 1;
}

/* Improve indentation visual clarity */
.code-display pre {
    tab-size: 4;
    -moz-tab-size: 4;
}

@media (max-width: 480px) {
    /* kill any page-level horizontal scroll */
    html, body { overflow-x: hidden; }
  
    /* header: make everything fit */
    .portfolio-header { padding: 0.5rem 0; }
    .header-container { padding: 0 0.9rem; }
    .site-logo { font-size: 1.15rem; letter-spacing: -0.3px; }
    .header-nav { gap: 0.25rem; }
  
    .nav-link {
      width: 30px;
      height: 30px;
      border-radius: 7px;
    }
  
    .nav-link svg {
      width: 16px;
      height: 16px;
    }
  
    /* hero: keep a natural gap below fixed header */
    .portfolio-hero {
      min-height: auto;
      justify-content: flex-start;
      padding: 1rem;
      padding-top: 5.25rem; /* header space */
      padding-bottom: 2rem;
    }
  
    /* optional: add a bit of breathing room between subtitle and editor */
    .editor-module { margin-top: 0.75rem; }
  
    /* code: stop horizontal overflow even with Prism */
    .code-container {
      padding: 1rem;
      overflow-x: hidden;
      max-width: 100%;
    }
  
    /* Prism often sets white-space: pre on these. Override hard on mobile. */
    .code-container pre,
    .code-container code,
    pre.code-display,
    pre.code-display code {
      white-space: pre-wrap !important;
      overflow-wrap: anywhere !important;
      word-break: break-word !important;
    }
  
    /* smaller code text on mobile */
    .code-display code {
      font-size: 0.85rem;
      line-height: 1.65;
    }
  }

  /* tablet: reduce the hero top gap (iPad etc) */
@media (max-width: 1024px) {
    .portfolio-hero {
      min-height: auto;            /* stops vertical centering behavior */
      justify-content: flex-start; /* don't push content down */
      padding-top: 5.5rem;         /* adjust 5rem-6rem if needed */
      padding-bottom: 2rem;
    }
  }

  /* short screens like Nest Hub Max (1280x800) */
@media (max-height: 820px) and (max-width: 1366px) {
    .portfolio-hero {
      min-height: auto;
      justify-content: flex-start;
      padding-top: 6rem;     /* tweak 5rem–7rem */
      padding-bottom: 2rem;
    }
  }