/* ---------- Base & Variables ---------- */
:root {
    --sidebar-w: 220px;
    --topbar-h: 64px;
    --content-max: 1100px;
    --content-pad: 24px;
    --sidebar-bg: #111;
    --highlight: #4FB1E3;
    --highlight-dark: #3a8db8;
    --text-primary: #fff;
    --text-secondary: #ccc;
    --border-color: rgba(255, 255, 255, 0.15);
    --panel-bg: rgba(0, 0, 0, 0.55);
    --panel-overlay: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65));
  }
  
  html { scroll-behavior: smooth; }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #000;
    color: var(--text-primary);
  }
  
  /* ---------- Desktop Sidebar ---------- */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 10;
  }
  .sidebar h1 {
    line-height: 1.2;
    margin-bottom: 2.5rem;
    font-weight: 600;
  }
  .sidebar nav a {
    display: block;
    margin: 1.2rem 0;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
  }
  .sidebar nav a:hover,
  .sidebar nav a.active {
    color: var(--highlight);
  }
  
  /* ---------- Main Content & Panels ---------- */
  main { margin-left: var(--sidebar-w); }
  .panel {
    min-height: 100vh;
    padding: 5rem var(--content-pad);
    display: flex;
    align-items: center;
    justify-content: center;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
  }
  .panel-content {
    width: 100%;
    max-width: var(--content-max);
    text-align: center;
  }
  
  /* Panel Backgrounds */
  #home     { background-image: var(--panel-overlay), url('./221.png'); }
  #timeline { background-image: var(--panel-overlay), url('./new_space.png'); }
  #resume   { background-image: var(--panel-overlay), url('./new_leaves.png'); }
  #projects { background-image: var(--panel-overlay), url('./new_space.png'); }
  #contact  { background-image: var(--panel-overlay), url('./new_leaves.png'); }
  
  /* Panel Headers & General Content */
  .panel-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
  }
  .panel-content > p {
    max-width: 800px;
    margin: 0 auto 1.5rem auto;
    line-height: 1.6;
    color: var(--text-secondary);
  }
#home {
  align-items: flex-start; /* Aligns content to the top instead of center */
  padding-top: 5vh;       /* Pushes the content down from the top edge */
}
  #home .subtitle { font-size: 1.1rem; margin-bottom: 2rem; }
  .btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
    background: var(--highlight);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
  }
  .btn:hover { background: var(--highlight-dark); }
  
  /* ---------- Timeline Section ---------- */
  .timeline-horizontal {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2.5rem 0;
  }
  .timeline-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.8rem 1.3rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.25s ease;
    min-width: 190px;
    text-align: left;
  }
  .timeline-btn .company { display: block; font-weight: 600; }
  .timeline-btn .dates { display: block; font-size: 0.85em; color: #aaa; margin-top: 0.2rem; }
  .timeline-btn:hover { border-color: var(--highlight); transform: translateY(-3px); }
  .timeline-btn.active {
    background: rgba(79, 177, 227, 0.3);
    border-color: var(--highlight);
    color: var(--highlight);
  }
  .timeline-details { margin-top: 1rem; }
  .timeline-details h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
  .timeline-details p { line-height: 1.7; max-width: 700px; margin: auto; }
  
  /* ---------- Resume Section ---------- */
  .resume-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    margin: 2.5rem 0;
    text-align: left;
    justify-content: center;
  }
  .resume-section { flex: 1 1 400px; max-width: 500px; }
  .resume-section h2 { color: var(--highlight); margin-bottom: 1rem; text-align: center; font-size: 1.5rem; }
  .resume-section ul { list-style: none; line-height: 1.7; }
  .resume-section ul li { margin-bottom: 0.75rem; }
  .resume-section ul li span { margin-left: 0.5rem; color: #aaa; }
  
  /* ---------- Projects Section ---------- */
  .projects-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-top: 2.5rem;
  }
  .project-card {
    background: var(--panel-bg);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
  }
  .project-card:hover { transform: translateY(-5px); border-color: var(--highlight); }
  .project-card h2 { color: var(--highlight); margin-bottom: 0.75rem; line-height: 1.3; }
  .project-card p { line-height: 1.6; color: var(--text-secondary); }
  
  /* ---------- Contact Section ---------- */
  .contact-info {
    margin: 2rem 0;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  .contact-info a { color: var(--highlight); text-decoration: none; }
  .contact-info a:hover { text-decoration: underline; }
  .contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin: 1.5rem auto 0 auto;
  }
  .form-group { display: flex; flex-direction: column; text-align: left; }
  .contact-form label { color: var(--text-secondary); margin-bottom: 0.25rem; }
  .contact-form input,
  .contact-form textarea {
    padding: 0.9rem;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-radius: 8px;
    resize: vertical;
    transition: all 0.2s ease;
  }
  .contact-form input:focus,
  .contact-form textarea:focus {
    outline: none;
    border-color: var(--highlight);
    box-shadow: 0 0 0 3px rgba(79, 177, 227, 0.25);
  }
  .contact-form button[type="submit"] { margin-top: 0.5rem; align-self: flex-start; }
  #form-status { margin-top: 0.5rem; font-weight: 500; min-height: 1.2em; }
  #form-status.success { color: #5cb85c; }
  #form-status.error { color: #d9534f; }
  
  
  /* ---------- Mobile & Tablet (≤ 900px) ---------- */
  @media (max-width: 900px) {
    /* Use a sticky top bar instead of a fixed sidebar */
    .sidebar {
      position: sticky;
      top: 0;
      width: 100%;
      height: auto;
      flex-direction: column;
      align-items: center;
      gap: .5rem;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    }
    .sidebar h1 {
      margin: 0;
      font-size: 1.2rem;
      white-space: nowrap;
    }
    .sidebar nav {
      display: flex;
      gap: 0rem;
      overflow-x: auto;
      padding-bottom: 0rem; /* For scrollbar spacing */
      scrollbar-width: none; /* Firefox */
    }
    .sidebar nav::-webkit-scrollbar { display: none; } /* Chrome, Safari */
    .sidebar nav a {
      margin: 0;
      padding: 0.4rem 0.6rem;
      border-radius: 8px;
      white-space: nowrap;
    }
    .sidebar nav a.active {
      background: rgba(255, 255, 255, 0.1);
    }
  
    /* Adjust main content and panels for mobile layout */
    main { margin-left: 0; }
    .panel {
      min-height: auto;
      padding: 3rem var(--content-pad);
      background-attachment: scroll; /* Fixes issues on iOS */
      scroll-margin-top: 120px;
    }
	  
    #home {
      min-height: 125vh;
      background-position: center 30%;
    }
    .panel-content h1 { font-size: 2rem; }
    .timeline-btn { min-width: unset; width: 100%; }
  }
  
  @media (min-width : 549px ) and ( max-width : 900px ) and ( orientation : landscape ){
    .resume-section { flex: 1 1 45%; }
  }
