@font-face {
  font-family: 'Thesignature';
  src: local('Thesignature Regular'), local('Thesignature-Regular'),
       url('/assets/Thesignature.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

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

/* ── Design Tokens ── */
:root {
  --max-w:   672px;
  --font:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:    'IBM Plex Mono', monospace;
  
  /* Defaults (Dark) */
  --bg:      #09090b;
  --fg:      #fafafa;
  --muted:   #71717a;
  --faint:   #27272a;
  --border:  #18181b;
  --accent:  #3b82f6;
}


/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.4s ease, color 0.4s ease;
}

a { color: inherit; text-decoration: none; }

::selection {
  background: var(--accent);
  color: #fff;
}

/* ── Layout ── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ── */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 24px;
}

.nav-left {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 400;
}

.nav-left a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-left a.active { color: var(--fg); }
.nav-left a:hover  { color: var(--fg); }

.hero canvas {
  flex-shrink: 0;
  margin-top: 4px;
}

.name {
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.role {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  font-weight: 400;
}

.cv-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 16px;
  margin-bottom: 20px;
  text-decoration: none;
  transition: all 0.2s ease;
  background: rgba(255,255,255,0.02);
}

.cv-tag:hover {
  color: var(--fg);
  border-color: var(--faint);
  background: rgba(255,255,255,0.05);
}

.cv-tag i {
  margin-left: 6px;
  font-size: 10px;
}

.bio {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 480px;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* ── Blocks ── */
.block {
  margin-bottom: 40px;
}

.block-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.block p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 8px;
}

.block p:last-of-type { margin-bottom: 0; }

.block-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.3s ease;
}

.block-link:hover {
  text-decoration-color: var(--accent);
}

/* ── Contact ── */
.contact-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 20px;
}

.fields {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

input, textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  padding: 12px 0;
  font-family: var(--font);
  font-size: 13px;
  width: 100%;
  outline: none;
  resize: none;
  transition: border-color 0.2s ease;
}

input:focus, textarea:focus { border-bottom-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { height: 80px; padding-top: 12px; }

.send-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 48px;
}

.send-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease;
}

.send-btn:hover { opacity: 0.7; }
.hint { font-size: 12px; color: var(--faint); }

/* ── Social Links ── */
.links { border-top: 1px solid var(--border); }

.link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  transition: opacity 0.2s ease;
}

.link-row:hover { opacity: 0.6; }

.link-name {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-name i {
  width: 14px;
  text-align: center;
  color: var(--faint);
  font-size: 12px;
}

.link-val {
  color: var(--fg);
  font-size: 12px;
  font-weight: 500;
}

/* ── Signature ── */
.sig {
  text-align: center;
  padding: 48px 0 24px;
  font-size: 3rem;
  color: var(--accent);
  font-family: 'Thesignature', cursive;
  font-style: normal;
  letter-spacing: 0.05em;
  font-weight: normal;
  width: fit-content;
  margin: 0 auto;
  white-space: nowrap;
  opacity: 0;
  animation: sigReveal 1.5s ease-out 0.3s forwards;
}

@keyframes sigReveal {
  0%   { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ── Footer ── */
.footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer span i { margin-right: 4px; }
.footer .temp { color: var(--fg); font-weight: 500; }

/* ── Copyright ── */
.copyright {
  text-align: center;
  font-size: 11px;
  color: var(--faint);
  padding: 24px 0 48px;
  margin-top: 16px;
}

.copyright p { margin: 0; }

/* ── Premium Links ── */
.premium-link {
  color: var(--fg);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.3s ease;
}

.premium-link:hover { text-decoration-color: var(--accent); }

/* ── Link Preview Card ── */
.preview-card {
  position: fixed;
  width: 280px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.24);
}


.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════
   WORK PAGE
   ══════════════════════════════════ */

.section-block { margin-bottom: 48px; }

.section-hint {
  font-size: 13px;
  color: var(--faint);
  margin-bottom: 20px;
  font-style: italic;
}

/* ── Stack Icons ── */
.stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 20px;
  justify-content: center;
  align-items: center;
}

.stack-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: default;
}

.stack-icon:hover { opacity: 1; transform: translateY(-2px); }

.stack-icon img {
  width: 36px; height: 36px;
  object-fit: contain;
  filter: grayscale(1) brightness(0.6);
  transition: filter 0.3s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 1;
}

.stack-icon:hover img { 
  filter: grayscale(0) brightness(1); 
  transform: scale(1.15);
}

.stack-icon img.easter-egg-active {
  transform: scale(2.5) translateY(-8px) !important;
  z-index: 50;
}
.stack-icon span { font-size: 11px; color: var(--muted); font-weight: 500; }


.exp-row { 
  display: flex; 
  justify-content: space-between; 
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.exp-left { display: flex; flex-direction: column; gap: 2px; }
.exp-company { font-size: 14px; font-weight: 500; color: var(--fg); }
.exp-role { font-size: 13px; color: var(--muted); }

.exp-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  max-width: 360px;
  line-height: 1.6;
}

.exp-right { text-align: right; flex-shrink: 0; }
.exp-period { font-size: 12px; color: var(--muted); }
.exp-tag { font-size: 11px; color: var(--accent); display: block; margin-top: 2px; font-weight: 500; }

/* ── Showcase Cards (Dynamic Layout) ── */
.cards-showcase {
  position: relative;
  max-width: 720px;
  margin: 24px auto 48px;
  min-height: 420px;
  perspective: 1200px;
}

.showcase-card {
  position: absolute;
  width: 260px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s ease,
              z-index 0s;
}

.showcase-card:hover {
  z-index: 10 !important;
  transform: rotate(0deg) scale(1.05) translateY(-8px) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}



.mac-chrome {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.mac-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.mac-btn.red { background: #ff5f56; }
.mac-btn.yellow { background: #ffbd2e; }
.mac-btn.green { background: #27c93f; }

.modal-media {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
}


.showcase-card img,
.showcase-card video {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.showcase-card .card-no-img {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--faint);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}


.showcase-info {
  padding: 12px;
}

.showcase-info .card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 4px;
}

.showcase-info .card-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* Positions for each card */
.showcase-card:nth-child(1) { left: 10%;  top: 10px;  transform: rotate(-5deg); z-index: 2; }
.showcase-card:nth-child(2) { left: 30%;  top: 50px;  transform: rotate(-1deg); z-index: 3; }
.showcase-card:nth-child(3) { left: 55%;  top: 0px;   transform: rotate(4deg);  z-index: 2; }
.showcase-card:nth-child(4) { left: 20%;  top: 200px; transform: rotate(2deg);  z-index: 4; }
.showcase-card:nth-child(5) { left: 50%;  top: 210px; transform: rotate(-3deg); z-index: 1; }
.showcase-card:nth-child(6) { left: 5%;   top: 230px; transform: rotate(1deg);  z-index: 1; }

/* ── Fallback Grid (cards-grid for non-showcase) ── */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
  background: var(--bg);
}

.card:hover { border-color: var(--faint); transform: translateY(-2px); }

.card-placeholder {
  width: 100%; height: 140px;
  display: flex; align-items: center; justify-content: center;
  background: var(--faint);
  border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--muted); letter-spacing: 0.1em;
}



.wip {
  font-size: 10px; color: var(--faint);
  border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 4px;
}

.card-arrow { font-size: 12px; color: var(--faint); transition: color 0.2s ease; }
.card:hover .card-arrow { color: var(--accent); }
.card-overlay { display: none; }

/* ── Modal ── */
.overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center; justify-content: center;
  padding: 24px;
}


.overlay.open {
  display: flex;
}

.modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.modal-header { padding: 24px 24px 8px; }



.modal-body { padding: 0 24px 24px; }
.modal-label { font-size: 10px; letter-spacing: 0.15em; color: var(--accent); font-weight: 500; }
.modal-title { font-size: 16px; font-weight: 600; color: var(--fg); margin-bottom: 12px; }
.modal-section { font-size: 10px; letter-spacing: 0.12em; color: var(--faint); margin-bottom: 8px; margin-top: 16px; font-weight: 500; }
.modal-text { font-size: 13px; line-height: 1.7; color: var(--muted); }
.modal-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.modal-tag { font-size: 10px; color: var(--accent); border: 1px solid var(--border); padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.modal-divider { height: 1px; background: var(--border); margin: 16px 0; }
.modal-link { font-size: 12px; color: var(--accent); display: inline-block; margin-top: 12px; font-weight: 500; }
.modal-link:hover { opacity: 0.7; }
