/* ═══════════════════════════════════════════════════
   IRAKLI.UK — GUI PORTFOLIO
   Design system mirrors the landing page exactly.
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Syne:wght@700;800&display=swap');

/* ── CSS Variables ── */
:root {
  --bg:        #0b0b0b;
  --bg-2:      #111111;
  --border:    #1e1e1e;
  --border-2:  #2a2a2a;
  --text:      #e8e8e8;
  --text-2:    #777777;
  --text-3:    #3a3a3a;
  --green:     #007c0094;
  --green-dim: #007c0094;
  --t-blue:    #1793d1;
  --t-red:     #ff4444;
  --mono:      'IBM Plex Mono', 'Courier New', monospace;
  --display:   'Syne', sans-serif;
  --sidebar-w: 220px;
  --titlebar-h: 32px;
  --transition: all 0.18s ease;
}

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

html {
  font-size: 16.5px;
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
  -webkit-font-smoothing: antialiased;
}

/* ── Grid overlay (matches landing page body::before) ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px;
  line-height: 1.6;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ── Mac Window ── */
.mac-window {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1320px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}

/* ── Mac Titlebar ── */
.mac-titlebar {
  height: var(--titlebar-h);
  background: #161616;
  border-bottom: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 0;
  position: sticky;
  top: 0;
  z-index: 200;
  -webkit-user-select: none;
  user-select: none;
}

.mac-buttons { display: flex; gap: 7px; align-items: center; }

.mac-button {
  width: 12px; height: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  border: none;
  outline: none;
}

.mac-button.close    { background: #d45452; }
.mac-button.minimize { background: #d4a03a; }
.mac-button.maximize { background: #3da65c; }

.mac-button:hover { filter: brightness(1.2); }

.mac-button.close:hover::after,
.mac-button.minimize:hover::after,
.mac-button.maximize:hover::after {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-size: 9px; font-weight: 700; line-height: 1;
}
.mac-button.close:hover::after    { content: '×'; color: #6b1a1a; }
.mac-button.minimize:hover::after { content: '−'; color: #6b4a10; }
.mac-button.maximize:hover::after { content: '+'; color: #1a5030; }

.mac-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ── Mac Body (sidebar + content) ── */
.mac-body {
  display: flex;
  height: calc(100vh - var(--titlebar-h) - 48px); /* 48px = body padding top+bottom */
  overflow: hidden;
}

/* ═══════════════════════════════════
   SIDEBAR
═══════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: #0d0d0d;
  border-right: 1px solid var(--border-2);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  /* Thin custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

/* Sidebar header / logo */
.sidebar-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-name {
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-decoration: none;
  display: block;
  transition: var(--transition);
}

.sidebar-name:hover { color: var(--t-blue); }

.sidebar-handle {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-2);
  margin-top: 4px;
}

/* Sidebar nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.sidebar-section-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 18px 4px;
}

.sidebar-nav ul {
  list-style: none;
  margin: 0; padding: 0;
}

.sidebar-nav ul li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-2);
  text-decoration: none;
  transition: var(--transition);
  border-left: 2px solid transparent;
  letter-spacing: 0.03em;
}

.sidebar-nav ul li a:hover,
.sidebar-nav ul li a.active {
  color: var(--text);
  border-left-color: var(--t-blue);
  background: rgba(23, 147, 209, 0.05);
  padding-left: 20px;
}

.sidebar-nav ul li a .nav-prefix {
  color: var(--t-blue);
  font-size: 0.65rem;
  opacity: 0.7;
}

.sidebar-nav ul li a:hover .nav-prefix { opacity: 1; }

/* Sidebar divider */
.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 18px;
}

/* Sidebar external links */
.sidebar-ext a {
  color: var(--text-2) !important;
  font-size: 0.72rem !important;
}

.sidebar-ext a:hover { color: var(--t-blue) !important; border-left-color: var(--t-blue) !important; }
.sidebar-ext a.exit-link:hover { color: var(--t-red) !important; border-left-color: var(--t-red) !important; }

/* ═══════════════════════════════════
   MAIN CONTENT AREA
═══════════════════════════════════ */
.mac-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
  display: flex;
  flex-direction: column;
}

.mac-content::-webkit-scrollbar { width: 4px; }
.mac-content::-webkit-scrollbar-track { background: transparent; }
.mac-content::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

main {
  padding: 2.5rem 2.8rem;
  max-width: 1100px;
  flex: 1;
}

footer {
  padding: 0.65rem 2.8rem;
  border-top: 1px solid var(--border);
  font-size: 0.63rem;
  color: var(--text-3);
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-align: center;
  background: var(--bg);
}

footer p { color: var(--text-3); margin: 0; }

footer a {
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.18s ease;
}

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

/* ═══════════════════════════════════
   SECTION HEADINGS
═══════════════════════════════════ */
.articletitle {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--t-blue);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 2.5rem 0 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-2);
  position: relative;
}

.articletitle::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 32px; height: 1px;
  background: var(--t-blue);
}

/* First articletitle on page — less top margin */
main > div:first-child .articletitle,
#welcome + #about .articletitle { margin-top: 0; }

.skill-subsection-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--t-blue);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 1.8rem 0 0.8rem;
}

/* ── Welcome / page title ── */
#welcome {
  margin-bottom: 0.5rem;
}

#welcome p.welcome {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.04em;
}

/* Hide the <hr> rendered by JS */
#welcome hr { display: none; }

/* ═══════════════════════════════════
   CARDS  (academic-item)
═══════════════════════════════════ */
.academic-item {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  padding: 1rem 1.2rem;
  margin-bottom: 0.8rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.academic-item:hover {
  border-color: var(--border-2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

.academic-header {
  margin-bottom: 0.75rem;
}

/* Employer / University / Issuer name — large, white, prominent */
.academic-header h3 {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ── Degree / Position / Certificate entries ── */
.degree-entry,
.position-entry,
.certificate-entry,
.project-entry {
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.degree-entry:last-child,
.position-entry:last-child,
.certificate-entry:last-child,
.project-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Headers inside entries */
.degree-header,
.position-header,
.certificate-header,
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

/* Position / Degree / Certificate title — grey, subordinate */
.degree-title,
.position-title,
.certificate-title,
.project-title {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 400;
  color: #686868;
  flex: 1;
  min-width: 140px;
  line-height: 1.4;
}

/* Year / duration badges */
.year-status,
.duration-status,
.project-date-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.year, .duration, .project-date {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t-blue);
  background: rgba(23, 147, 209, 0.07);
  border: 1px solid rgba(23, 147, 209, 0.25);
  padding: 0.22rem 0.55rem;
  border-radius: 3px;
}

/* Status badges */
.status {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: 3px;
}

.status-completed    { color: var(--green-dim);  background: rgba(24,212,24,0.08);  border: 1px solid rgba(24,212,24,0.2); }
.status-attending    { color: var(--t-blue); background: rgba(23,147,209,0.08); border: 1px solid rgba(23,147,209,0.2); }
.status-inprogress   { color: var(--t-blue); background: rgba(23,147,209,0.08); border: 1px solid rgba(23,147,209,0.2); }
.status-ongoing      { color: var(--t-blue); background: rgba(23,147,209,0.08); border: 1px solid rgba(23,147,209,0.2); }
.status-transferred  { color: #f37c27d2;       background: rgba(249,115,22,0.08); border: 1px solid rgba(249,115,22,0.2); }
.status-cancelled    { color: var(--t-red);  background: rgba(255,68,68,0.08);  border: 1px solid rgba(255,68,68,0.2); }
.status-suspended    { color: var(--t-red);  background: rgba(255,68,68,0.08);  border: 1px solid rgba(255,68,68,0.2); }
.status-currently    { color: var(--green-dim);  background: rgba(24,212,24,0.08);  border: 1px solid rgba(24,212,24,0.2); }
.status-formerly     { color: var(--t-red);  background: rgba(255,68,68,0.08);  border: 1px solid rgba(255,68,68,0.2); }

/* Cert date badges */
.cert-date {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: 3px;
}
.cert-date-single { color: #eab308; background: rgba(234,179,8,0.08); border: 1px solid rgba(234,179,8,0.2); }
.cert-date-range  { color: #f97316; background: rgba(249,115,22,0.08); border: 1px solid rgba(249,115,22,0.2); }

.certificate-id {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #585858;
  margin-top: 0.3rem;
  letter-spacing: 0.03em;
}

/* Achievements */
.achievements {
  margin-top: 0.6rem;
  padding: 0.5rem 0.7rem;
  background: rgba(23,147,209,0.04);
  border: 1px solid rgba(23,147,209,0.2);
  border-left: 2px solid var(--t-blue);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text);
  line-height: 1.5;
}
.achievements strong { color: var(--t-blue); font-weight: 700; }

/* Company description */
.company-description {
  font-size: 0.76rem;
  color: #5a5a5a;
  font-style: italic;
  margin-bottom: 0.9rem;
  padding: 0.45rem 0.7rem;
  border-left: 2px solid rgba(23,147,209,0.4);
  background: rgba(23,147,209,0.03);
  border-radius: 0 3px 3px 0;
  line-height: 1.5;
}

/* Responsibilities */
.responsibilities {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.responsibilities li {
  font-size: 0.78rem;
  color: #5a5a5a;
  line-height: 1.6;
  padding: 0.15rem 0;
  padding-left: 1.1rem;
  position: relative;
}

.responsibilities li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--t-blue);
  font-size: 0.68rem;
}

/* Project access link */
.project-access {
  margin-top: 0.45rem;
  font-size: 0.72rem;
  color: var(--text-2);
  padding: 0.35rem 0.6rem;
  border-left: 2px solid var(--text-3);
  background: rgba(255,255,255,0.02);
  border-radius: 0 3px 3px 0;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.project-access strong { color: var(--text-2); font-weight: 600; }

/* ═══════════════════════════════════
   SKILLS
═══════════════════════════════════ */
.skill-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.skill-type-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-2);
  min-width: 130px;
  flex-shrink: 0;
  padding-top: 0.15rem;
  letter-spacing: 0.03em;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  flex: 1;
}

.skill-item {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.4rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-2);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-2);
  border-radius: 3px;
  white-space: nowrap;
  transition: var(--transition);
  cursor: default;
}

.skill-item:hover {
  color: var(--text);
  border-color: var(--border-2);
  background: rgba(255,255,255,0.06);
}

.skill-icon {
  width: 13px; height: 13px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Soft skills */
.soft-skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  align-items: center;
}

.soft-skill-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-2);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-2);
  border-radius: 3px;
  white-space: nowrap;
  transition: var(--transition);
  cursor: default;
}

.soft-skill-item:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

/* ═══════════════════════════════════
   LANGUAGES
═══════════════════════════════════ */
.languages-list-centered {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  align-items: center;
}

.language-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-2);
  border-radius: 3px;
  transition: var(--transition);
  cursor: default;
}

.language-item:hover { border-color: var(--t-blue); background: rgba(23,147,209,0.05); }

.language-flag {
  width: 16px; height: 12px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  opacity: 0.9;
}

.proficiency-badge {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.08rem 0.3rem;
  border-radius: 2px;
  margin-left: 0.1rem;
}
.proficiency-advanced    { color: #18d418;  background: rgba(24,212,24,0.1);   border: 1px solid rgba(24,212,24,0.25); }
.proficiency-intermediate{ color: #eab308;        background: rgba(234,179,8,0.1);   border: 1px solid rgba(234,179,8,0.25); }
.proficiency-basic       { color: #f97316;        background: rgba(249,115,22,0.1);  border: 1px solid rgba(249,115,22,0.25); }

/* ═══════════════════════════════════
   ABOUT / CONTACT
═══════════════════════════════════ */
.about-paragraph {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 0.7rem;
}
.about-paragraph:last-child { margin-bottom: 0; }
.about-firstline { color: var(--text); font-weight: 500; }

.contact-info {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* ═══════════════════════════════════
   LINKS
═══════════════════════════════════ */
.url {
  color: var(--t-blue);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.url:hover { color: #4ab8e8; }
.url::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  height: 1px; width: 0;
  background: var(--t-blue);
  transition: width 0.18s ease;
}
.url:hover::after { width: 100%; }

/* ═══════════════════════════════════
   MISC LEGACY CLASSES
═══════════════════════════════════ */
hr {
  border: none;
  height: 1px;
  background: var(--border-2);
  margin: 1.5rem 0;
}

/* ── Mobile hamburger toggle (hidden on desktop) ── */
.menu-toggle { display: none; }

/* ═══════════════════════════════════
   RESPONSIVE
═══════════════════════════════════ */
@media (max-width: 900px) {
  body { padding: 0; }

  .mac-window {
    border-radius: 0;
    min-height: 100vh;
    border: none;
    overflow: visible;
  }

  /* Mac titlebar: always sticky at very top, full width */
  .mac-titlebar {
    position: sticky;
    top: 0;
    z-index: 300;
    border-radius: 0;
  }

  .mac-body {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  /* sidebar nav bar: sticky just below titlebar */
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-2);
    overflow: visible;
    position: sticky;
    top: var(--titlebar-h);
    z-index: 100;
    background: #0d0d0d;
  }

  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
  }

  .sidebar-name { font-size: 0.75rem; }
  .sidebar-handle { display: none; }

  /* Floating dropdown — overlays content, opens from right (same side as hamburger) */
  .sidebar-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 200;
    background: #0d0d0d;
    border: 1px solid var(--border-2);
    border-top: none;
    padding: 4px 0 6px;
    width: auto;
    min-width: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  }

  .sidebar-nav.open { display: block; }

  .sidebar-section-label {
    padding: 5px 12px 2px;
    font-size: 0.54rem;
    white-space: nowrap;
  }

  .sidebar-nav ul li a {
    padding: 4px 16px 4px 12px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .sidebar-divider { margin: 3px 12px; }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 4px;
  }

  .menu-toggle div {
    width: 18px; height: 2px;
    background: var(--text-2);
    border-radius: 1px;
    transition: var(--transition);
  }

  .mac-content { overflow: visible; height: auto; }

  main { padding: 1.5rem 1.2rem; flex: none; }
  footer { padding: 0.5rem 1.2rem; }

  /* Entry headers: title on its own line, date/status below */
  .degree-header,
  .position-header,
  .certificate-header,
  .project-header {
    flex-direction: column;
    gap: 0.3rem;
  }

  .degree-title,
  .position-title,
  .certificate-title,
  .project-title {
    flex: none;
    width: 100%;
    white-space: normal;
  }

  .year-status,
  .duration-status,
  .project-date-status {
    flex-shrink: 1;
  }

  /* Skill rows: type label on its own line, skills wrap below */
  .skill-row {
    flex-direction: column;
    gap: 0.35rem;
  }

  .skill-type-label {
    min-width: auto;
    width: 100%;
  }

  /* Soft skills: ~3 per row — fixed width items, last row centres via flex */
  .soft-skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
  }

  .soft-skill-item {
    flex: 0 0 calc(33.333% - 0.28rem);
    justify-content: center;
  }

  /* Languages: ~2 per row — fixed width items, last row centres via flex */
  .languages-list-centered {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
  }

  .language-item {
    flex: 0 0 calc(50% - 0.23rem);
    justify-content: center;
  }
}

@media (max-width: 480px) {
  main { padding: 1rem 0.9rem; }
  .articletitle { font-size: 1rem; }
  .academic-header h3 { font-size: 0.82rem; }
  .degree-title, .position-title, .certificate-title, .project-title { font-size: 0.78rem; }

  .soft-skill-item { flex: 0 0 calc(33.333% - 0.28rem); }
  .language-item   { flex: 0 0 calc(50% - 0.23rem); }
}
