:root{
  --bg-editor: #1e1e1e;
  --bg-sidebar: #181818;
  --bg-activity: #141414;
  --bg-elevated: #252526;
  --bg-hover: #2a2d2e;
  --border: #2d2d2d;
  --border-soft: #333;
  --text: #d4d4d4;
  --text-dim: #808080;
  --comment: #6a9955;
  --kw: #569cd6;
  --cls: #4ec9b0;
  --str: #ce9178;
  --accent: #4ec9b0;
  --accent-soft: rgba(78,201,176,.12);
  --red: #f14c4c;
  --yellow: #cca700;
  --green: #4ec9b0;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-body: 'Inter Tight', system-ui, sans-serif;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  overflow: hidden;
  background: var(--bg-editor);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
}
a{ color: var(--accent); text-decoration: none; }
a:hover{ color: #7fe0cf; }

/* ---------- IDE shell ---------- */
.ide-shell{ display:flex; height:100vh; overflow: hidden; }

.activity-bar{
  width:48px; background:var(--bg-activity); border-right:1px solid var(--border);
  display:flex; flex-direction:column; align-items:center; gap:22px; padding-top:16px;
  flex-shrink:0;
}
.activity-icon{ color:#858585; cursor:pointer; padding:4px; border-left:2px solid transparent; }
.activity-icon.active{ color:#fff; border-left-color: var(--accent); }

.sidebar{
  width:230px; background:var(--bg-sidebar); border-right:1px solid var(--border);
  display:flex; flex-direction:column; flex-shrink:0;
  font-family: var(--font-mono); font-size:13px;
}
.sidebar-header{
  padding:14px 16px 6px; color:#bbb; letter-spacing:1.5px; font-size:11px; font-weight:600;
}
.sidebar-project{ padding:2px 16px 10px; color:#ccc; font-weight:600; }
.file-tree{ display:flex; flex-direction:column; padding-left:8px; flex: 1; overflow-y: auto; }
.file-item{
  display:flex; align-items:center; gap:8px; padding:6px 16px; color:var(--text-dim);
  border-left:2px solid transparent;
}
.file-item:hover{ background:var(--bg-hover); color:var(--text); }
.file-item.active{ background:var(--bg-hover); color:#fff; border-left-color:var(--accent); }
.file-icon{ font-size:9px; }
.file-icon.py{ color:var(--kw); }
.file-icon.sh{ color:var(--comment); }

.sidebar-footer{
  margin-top:auto; padding:14px 16px; border-top:1px solid var(--border);
}
.status-line{ font-size:12px; margin-bottom:4px; display:flex; align-items:center; gap:6px; color:#ccc; }
.status-line.muted{ color:var(--text-dim); }
.status-dot{ width:7px; height:7px; border-radius:50%; background:var(--green); display:inline-block; box-shadow:0 0 6px var(--green); }

.editor-column{ flex:1; display:flex; flex-direction:column; min-width:0; }

.tab-bar{
  display:flex; background:var(--bg-sidebar); border-bottom:1px solid var(--border);
  overflow-x:auto; flex-shrink:0;
}
.tab{
  font-family: var(--font-mono); font-size:13px; color:var(--text-dim);
  padding:10px 18px; border-right:1px solid var(--border); white-space:nowrap;
  background:var(--bg-sidebar); border-top:2px solid transparent;
}
.tab.active{ background:var(--bg-editor); color:#fff; border-top-color:var(--accent); }
.tab:hover{ color:#fff; }

.breadcrumb{
  font-family: var(--font-mono); font-size:12px; color:var(--text-dim);
  padding:6px 24px; border-bottom:1px solid var(--border); flex-shrink:0;
}

.editor-pane{ flex:1; overflow-y: auto; overflow-x: hidden; }

.status-bar{
  background:#007acc; color:#fff; font-family: var(--font-mono); font-size:12px;
  display:flex; gap:18px; padding:4px 16px; flex-shrink:0;
}
.status-bar-right{ margin-left:auto; }

/* ---------- code sections ---------- */
.code-section{ padding:28px 0; border:none; }
.line-gutter{
  width:56px; flex-shrink:0; text-align:right; padding-right:16px;
  font-family: var(--font-mono); font-size:13px; color:#4a4a4a; user-select:none;
  display:flex; flex-direction:column; gap:6px; padding-top:4px;
}
.code-content{ padding:0 32px 0 8px; max-width:760px; }
.code-content.full{ max-width:920px; }

.code-comment{ font-family: var(--font-mono); color:var(--comment); font-size:13px; margin-bottom:14px; }
.code-line{ font-family: var(--font-mono); color:var(--text); margin:0; }
.kw{ color:var(--kw); }
.cls{ color:var(--cls); }
.str{ color:var(--str); }
.code-indent{ padding-left:24px; border-left:1px dashed var(--border-soft); margin-top:10px; }

.hero-name{
  font-family: var(--font-mono); font-weight:700; font-size:clamp(2rem, 5vw, 3.2rem);
  color:#fff; margin:6px 0 4px;
}
.hero-role{ font-family: var(--font-mono); font-size:14px; color:var(--str); margin-bottom:18px; }
.hero-bio{ font-family: var(--font-body); color:#c9c9c9; max-width:56ch; margin-bottom:26px; }
.hero-actions{ display:flex; gap:12px; flex-wrap:wrap; margin-bottom:22px; }
.hero-meta{ display:flex; gap:20px; flex-wrap:wrap; font-size:13px; color:var(--text-dim); }
.meta-link{ color:var(--text-dim); text-decoration:underline; }
.meta-link:hover{ color:var(--accent); }

.btn-editor-primary{
  font-family: var(--font-mono); background:var(--accent); color:#0d1f1c; font-weight:600;
  padding:10px 20px; border-radius:3px; border:1px solid var(--accent);
}
.btn-editor-primary:hover{ background:#7fe0cf; color:#0d1f1c; }
.btn-editor-outline{
  font-family: var(--font-mono); background:transparent; color:var(--text);
  padding:10px 20px; border-radius:3px; border:1px solid var(--border-soft);
}
.btn-editor-outline:hover{ border-color:var(--accent); color:var(--accent); }

.section-title{
  font-family: var(--font-mono); color:#fff; font-size:1.6rem; margin-bottom:28px;
  font-weight:700;
}

/* ---------- project cards ---------- */
.project-grid{ margin-top:6px; }
.project-card{
  background:var(--bg-elevated); border:1px solid var(--border); border-radius:6px;
  height:100%; display:flex; flex-direction:column; overflow:hidden;
}
.project-card-head{
  display:flex; align-items:center; gap:6px; padding:9px 12px; background:#2d2d2d; border-bottom:1px solid var(--border);
}
.dot{ width:10px; height:10px; border-radius:50%; }
.dot.red{ background:#ff5f56; } .dot.yellow{ background:#ffbd2e; } .dot.green{ background:#27c93f; }
.project-filename{ font-family: var(--font-mono); font-size:12px; color:var(--text-dim); margin-left:8px; }
.project-card-body{ padding:18px; flex:1; }
.project-card-body h3{ color:#fff; font-size:1.05rem; margin-bottom:8px; font-family: var(--font-mono); }
.project-card-body p{ color:#b4b4b4; font-size:14px; margin-bottom:14px; }
.stack-tags{ display:flex; flex-wrap:wrap; gap:6px; }
.tag{
  font-family: var(--font-mono); font-size:11px; color:var(--kw); background:rgba(86,156,214,.12);
  padding:3px 8px; border-radius:3px;
}
.project-card-foot{
  padding:12px 18px; border-top:1px solid var(--border); display:flex; gap:16px;
}
.project-card-foot a{ font-family: var(--font-mono); font-size:12.5px; }

/* ---------- modern skills grid ---------- */
.skills-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 15px;
  max-width: 820px;
  margin-top: 10px;
}
.skill-card-modern {
  display: flex;
  flex-direction: column;
  background: var(--bg-editor);
  padding: 14px;
  height: 130px;
  position: relative;
  transition: background-color 0.2s;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
}
.skill-card-modern:hover {
  background: var(--bg-hover);
}
.skill-card-name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #e2e2e2;
}
.skill-card-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}
.skill-card-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.skill-card-level {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  text-align: right;
}

/* ---------- My Experience Layout ---------- */
.experience-list-modern {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 800px;
}
.exp-item {
  display: flex;
  align-items: center;
  padding: 24px 32px;
  border-radius: 8px;
  transition: background-color 0.2s;
}
.exp-item.exp-active, .exp-item:hover {
  background: #232323;
}
.exp-period {
  font-family: var(--font-body);
  font-size: 14px;
  color: #a0a0a0;
  width: 200px;
  flex-shrink: 0;
}
.exp-details {
  flex: 1;
}
.exp-details h3 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px 0;
}
.company-canvas {
  margin: 0 0 4px 0;
  display: block;
}
.exp-location {
  font-family: var(--font-body);
  font-size: 13px;
  color: #888;
  margin: 0 0 12px 0;
}
.exp-roles {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.exp-role {
  display: flex;
  flex-direction: column;
}
.role-title {
  color: #d4d4d4;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
}
.role-period {
  color: #666;
  font-family: var(--font-mono);
  font-size: 12.5px;
  margin-left: 14px;
}

/* ---------- terminal contact ---------- */
.terminal-section{ padding-bottom:80px; }
.terminal-window{
  background:#0c0c0c; border:1px solid var(--border); border-radius:6px; max-width:640px; overflow:hidden;
}
.terminal-body{ padding:18px 20px; font-family: var(--font-mono); font-size:13.5px; }
.term-line{ color:#9cdcfe; margin:0 0 12px; }
.term-success{ color:var(--green); }
.term-error{ color:var(--red); }
.terminal-form label{ display:block; color:var(--comment); margin:12px 0 4px; }
.terminal-form input, .terminal-form textarea{
  width:100%; background:#161616; border:1px solid var(--border-soft); color:#fff;
  font-family: var(--font-mono); font-size:13px; padding:8px 10px; border-radius:3px;
}
.terminal-form input:focus, .terminal-form textarea:focus{
  outline:none; border-color:var(--accent);
}
.term-submit{ margin-top:16px; }

/* ---------- mobile ---------- */
.sidebar-toggle{
  display:none; position:fixed; bottom:20px; right:20px; z-index:50;
  width:44px; height:44px; border-radius:50%; background:var(--accent); color:#0d1f1c;
  border:none; font-size:18px;
}

@media (max-width: 860px){
  .activity-bar{ display:none; }
  .sidebar{
    position:fixed; top:0; left:0; height:100vh; z-index:40; transform:translateX(-100%);
    transition:transform .25s ease; box-shadow:2px 0 12px rgba(0,0,0,.5);
  }
  .sidebar.open{ transform:translateX(0); }
  .sidebar-toggle{ display:block; }
  .code-section{ padding:40px 0; }
  .line-gutter{ display:none; }
  .code-content, .code-content.full{ padding-left:20px; padding-right:20px; }
  .skill-name{ width:110px; }
  
  .contact-layout {
    flex-direction: column;
    gap: 40px;
  }
  .contact-form-modern .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* ---------- modern contact ---------- */
.contact-layout {
  display: flex;
  gap: 60px;
  max-width: 900px;
  margin-top: 10px;
}
.contact-left {
  flex: 1;
}
.contact-title {
  font-family: var(--font-body);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  margin-top: 12px;
}
.contact-right {
  flex: 1.2;
}
.contact-form-modern .form-row {
  display: flex;
  gap: 20px;
}
.contact-form-modern .form-group {
  margin-bottom: 24px;
  flex: 1;
}
.contact-form-modern label {
  display: block;
  font-family: var(--font-mono);
  color: #a0a0a0;
  font-size: 13px;
  margin-bottom: 10px;
}
.contact-form-modern input, 
.contact-form-modern textarea {
  width: 100%;
  background: transparent;
  border: 1px solid #333;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 14px 16px;
  border-radius: 2px;
}
.contact-form-modern input:focus, 
.contact-form-modern textarea:focus {
  outline: none;
  border-color: #666;
  background: #1a1a1a;
}
.contact-form-modern input::placeholder, 
.contact-form-modern textarea::placeholder {
  color: #555;
}
.btn-submit-modern {
  background: #fff;
  color: #000;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  border: none;
  padding: 12px 28px;
  cursor: pointer;
  border-radius: 2px;
  display: inline-block;
}
.btn-submit-modern:hover {
  background: #e0e0e0;
}

/* Truncate project card description */
.project-card-body p.short-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;  
  overflow: hidden;
}

/* Modal Dialog Styles */
dialog.project-modal {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  max-width: 600px;
  width: 90%;
  padding: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  margin: auto;
}

dialog.project-modal::backdrop {
  background-color: rgba(13, 17, 23, 0.7);
  backdrop-filter: blur(4px);
}

.modal-header {
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--border);
  background: #252526;
  border-radius: 8px 8px 0 0;
  padding: 0;
  overflow: hidden;
}

.modal-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1e1e1e;
  padding: 8px 15px;
  border-top: 1px solid #007acc;
  border-right: 1px solid var(--border);
  color: #fff;
  font-family: inherit;
  font-size: 0.9em;
  min-width: 150px;
}

.modal-title {
  color: #cccccc;
  font-weight: 500;
  margin: 0;
  font-size: 1em;
  flex: 1;
}

.modal-close {
  background: none;
  border: none;
  color: #cccccc;
  cursor: pointer;
  font-size: 1.1em;
  padding: 2px 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-breadcrumb {
  padding: 5px 20px;
  font-size: 0.8em;
  color: #858585;
  background: #1e1e1e;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 5px;
}

.modal-body {
  padding: 20px;
}

.modal-desc {
  margin-bottom: 20px;
  line-height: 1.6;
}

.modal-links {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}
