/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* color */
  --bg:        #0B0F10;
  --bg-alt:    #10161A;
  --surface:   #151C1F;
  --surface-2: #191F22;
  --border:    #26312F;
  --border-soft: #1D2528;
  --text:      #E7ECE9;
  --text-dim:  #8FA39C;
  --text-faint:#5C6D67;
  --amber:     #FFB020;
  --amber-dim: #C98A1A;
  --cyan:      #5FD4C4;
  --red:       #FF5D5D;
  --applered : #E24B41;
  --appleyellow : #FFBD2E;
  --applegreen : #28C941;

  /* type */
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-typewriter: 'Courier New', Courier, monospace;

  /* layout */
  --content-w: 1100px;
  --radius: 3px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* faint scanline / grid texture on the whole page for tech ambience */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 42px 42px;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

h1, h2, h3 { margin: 0; font-family: var(--font-mono); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* ============================================================
   MODE SWITCH — fixed top-left
   ============================================================ */
.mode-switch {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--text-faint);
  border-radius: var(--radius);
  padding: 3px;
  gap: 20px;
}

.mode-btn {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.mode-btn[aria-selected="true"] { color: var(--bg); }

.mode-switch-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: var(--amber);
  border-radius: 2px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

body[data-mode="terminal"] .mode-switch-thumb {
  transform: translateX(100%);
}

/* ============================================================
   VIEWS
   ============================================================ */
.view { position: relative; z-index: 1; }
.view--terminal { display: none; }
body[data-mode="terminal"] .view--gui { display: none; }
body[data-mode="terminal"] .view--terminal { display: block; }
body[data-mode="terminal"] { background: #000; }



/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: fixed;
  top: 24px;
  right: 32px;
  z-index: 90;
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  background-color: var(--bg);
  padding:10px;
  border-radius: 5px;
}
.site-nav__link { color: var(--text-dim); }
.site-nav__link:hover { color: var(--amber); text-decoration: none;}

@media (max-width: 720px) {
  .site-nav { position: fixed; justify-content: center; align-items: center; top: 0px; left: 10%; padding: 84px 20px 0; gap: 15px; background-color: var(--bg); margin-left: -100px; margin-right:-100px;}
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 150px 32px 96px;
  display: grid;
  grid-template-columns: 2fr 1.5fr;
  gap: 16px;
  align-items: start;
}

.hero__kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  margin: 0 0 18px;
}

.hero__headline {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.22;
  color: var(--text);
  font-weight: 600;
}

.cursor {
  color: var(--amber);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__sub {
  margin-top: 20px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 14px;
}

.status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(50px);
  animation: rise-in 1s ease 1.1s forwards;
}
@keyframes rise-in { to { opacity: 1; transform: translateY(10px); } }

.window-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.window-chrome--tight { margin-top: 28px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot--a { background: var(--applered); }
.dot--b { background: var(--appleyellow); }
.dot--c { background: var(--applegreen); }
.window-chrome__title {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

.status-card__body { margin: 0; padding: 16px 18px; }
.status-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 13px;
}
.status-row:last-child { border-bottom: none; }
.status-row dt { color: var(--text-faint); margin: 0; }
.status-row dd { margin: 0; color: var(--text); text-align: right; }
.status-row a { color: var(--cyan); }

.pulse-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 110px; }
}

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 88px 32px;
  border-top: 1px solid var(--border-soft);
}

.section__label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  margin: 0 0 10px;
}

.section__heading {
  font-size: 1.7rem;
  margin-bottom: 36px;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  margin-top: 20px;
}

.about-copy p { color: var(--text); font-size: 1.02rem; max-width: 62ch; opacity: 0; animation: finfin 0.5s ease 0.5s forwards;}
@keyframes finfin { to { opacity: 1;} }

.about-facts { }
.fact-list { list-style: none; margin: 0 0 4px; padding: 0; border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); background: var(--surface); }
.fact-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px;
}
.fact-list li:last-child { border-bottom: none; }
.fact-list__label { color: var(--text); }
.fact-list__meta { color: var(--text-faint); font-family: var(--font-mono); font-size: 12px; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PROJECTS
   ============================================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.old-project-grid {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* older project section */
.old-project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.old-project-card:hover {border-color: var(--cyan);}

.old-project-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.old-project-card .old-project-card__desc {align-items: start; color: transparent; font-size: 0px; margin-bottom: 14px; flex: 1; transition: all 0.5s ease-in-out;}
.old-project-card:hover .old-project-card__desc {color: var(--text-dim); font-size: 13.5px; transform: translateY(0);}

/* focus on each column of old project section */
.old-project-grid:hover .old-project-card {opacity : 0.6;}
.old-project-grid .old-project-card:hover{opacity: 1; transform: scale(1.10); box-shadow: 0 10px 30px rgba(52,152,219,0.2); z-index: 10;}

.project-card__preview {
  height: 128px;
  position: relative;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-card__preview svg { width: 100%; height: 100%; }

.project-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }

.project-card__title { font-size: 1rem; margin-bottom: 8px; color: var(--text); }

.project-card__desc { color: var(--text-dim); font-size: 13.5px; margin-bottom: 14px; flex: 1; }

.project-card__stack { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
  border: 1px solid rgba(255, 176, 32, 0.28);
  background: rgba(255, 176, 32, 0.06);
  padding: 3px 8px;
  border-radius: 2px;
}

.project-card__links { display: flex; gap: 16px; font-family: var(--font-mono); font-size: 12.5px;}
.project-card__links a { color: var(--text-dim); }
.project-card__links a:hover { color: var(--cyan); }

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.skill-group {
  padding: 20px 22px;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}

.skill-group__title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.skill-group__title span { color: var(--amber); }

.skill-group ul { list-style: none; margin: 0; padding: 0; }
.skill-group li {
  font-size: 14px;
  color: var(--text);
  padding: 5px 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.skill-group li::before {
  content: "›";
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  margin-top: 20px;
}

.contact-lead { color: var(--text-dim); max-width: 48ch; margin-bottom: 24px; }

.contact-email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--amber);
  margin-bottom: 10px;
}
.contact-email:hover { color: var(--cyan); }

.contact-phone {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 26px;
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13.5px;
  padding: 11px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid var(--border);
}
.btn--ghost { color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); text-decoration: none; }
.btn--solid { color: var(--bg); background: var(--amber); border-color: var(--amber); font-weight: 600; }
.btn--solid:hover { background: var(--cyan); border-color: var(--cyan); }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); }
.field input, .field textarea {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--amber);
}
.field-note { font-family: var(--font-sans); font-size: 12px; color: var(--text-faint); margin: 0; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 48px 32px 80px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  border-top: 1px solid var(--border-soft);
}

.site-footer__brand { display: flex; flex-direction: column; gap: 4px; }
.brand-mark { font-family: var(--font-mono); color: var(--text); font-size: 14px; }
.brand-tag { font-size: 12.5px; color: var(--text-faint); }

.social-list { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; font-family: var(--font-mono); font-size: 13px; }
.social-list a { color: var(--text-dim); }
.social-list a:hover { color: var(--amber); }

.site-footer__meta { width: 100%; font-size: 12px; color: var(--text-faint); margin-top: 8px; }

/* ============================================================
   TERMINAL VIEW
   ============================================================ */
.terminal {
  min-height: 100vh;
  background: #05080A;
  color: #D9F5E5;
  font-family: var(--font-mono);
  font-size: 14.5px;
  line-height: 1.65;
  padding: 90px 28px 40px;
  max-width: 900px;
  margin: 0 auto;
  cursor: text;
}

.terminal__output { white-space: pre-wrap; word-break: break-word; }
.terminal__output .line { margin-bottom: 2px; }
.terminal__output .line--muted { color: #5C7A6D; }
.terminal__output .line--amber { color: var(--amber); }
.terminal__output .line--cyan { color: var(--cyan); }
.terminal__output .line--error { color: var(--red); }
.terminal__output .line--heading { color: #D9F5E5; font-weight: 600; margin-top: 10px; }
.terminal__output a { color: var(--cyan); }

.terminal__output .prompt-echo { color: #6EE7B7; }
.terminal__output .prompt-echo::before { content: "guest@anirban-maitra:~$ "; color: #5C7A6D; }

.terminal__input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.terminal__prompt { color: #5C7A6D; white-space: nowrap; }

.terminal__input {
  flex: 1;
  background: transparent;
  border: none;
  color: #D9F5E5;
  font-family: var(--font-mono);
  font-size: 14.5px;
  outline: none;
  margin-left: -0px;
  caret-color: transparent;
}

.terminal__caret {
  color: var(--amber);
  animation: blink 1s step-end infinite;
  margin-left: -0px;
  pointer-events: none;
}

.terminal__caret.is-typing {
  display: none;
}

.terminal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px 24px;
}
@media (max-width: 600px) { .terminal-grid { grid-template-columns: 1fr; } }

@media (max-width: 600px) {
  .terminal { font-size: 13.5px; padding-top: 78px; }
}



/* ============================================================
   HANGING 3D ID CARD
   Reserves a real left-hand gutter (rather than relying on
   incidental margin) so the card never overlaps page content,
   and hides itself + gives that space back on narrower
   viewports and in Terminal mode.
   ============================================================ */
.lanyard {
  position: fixed;
  top: 10%;         /* clears the GUI/Terminal switch above it */
  left: 10px;
  width: 220px;       
  height: 560px;
  z-index: 40;
  pointer-events: none; /* re-enabled on the canvas itself */
}

.lanyard__canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}

.lanyard__canvas.is-dragging { cursor: grabbing; }

body[data-mode="terminal"] .lanyard { display: none; }

/* Hide on narrower / touch-first viewports, where there's no
   room for a dedicated left gutter and a fixed hanging card
   would just get in the way of thumb scrolling. */
@media (max-width: 1119px) {
  /*.lanyard { display: none; }*/
  .lanyard {
    position: absolute;
    left: 50%;
    top: 10%;
    transform: translateX(-50%);
    z-index: -1;
  }
  .view--gui {
    margin-top: 550px;
  }
}

/* From 1120px up, push the page's own content right by the
   same amount as the card's column, so the two never overlap —
   this is what actually makes the card visible: it now has
   real dedicated space instead of fighting for incidental
   margin. */
@media (min-width: 1120px) {
  body[data-mode="gui"] {
    padding-left: 240px;
  }
}