/* ══════════════════════════════════════════════════
   tech.css — LIGHT-MODE Developer Portfolio
   Mirrors the reference layout, red accent (#DC2626)
   Deliberately the opposite of the dark visual portfolio
══════════════════════════════════════════════════ */

:root {
  --accent: #DC2626;
  --accent-dark: #b91c1c;
  --ink: #161616;
  --muted: #6b7280;
  --border: #e4e4e4;
  --bg: #ffffff;
  --bg-alt: #fafafa;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
section { scroll-margin-top: 90px; position: relative; }
a { text-decoration: none; color: inherit; }

/* ── Custom circle cursor (pointer devices only) ──
   Hide the native cursor only when JS is active so no-JS users keep theirs. */
@media (hover: hover) and (pointer: fine) {
  html.js-on body,
  html.js-on a,
  html.js-on button,
  html.js-on .skill-card,
  html.js-on .project-card { cursor: none; }
}
.cursor {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform .1s ease, width .3s ease, height .3s ease, background .3s ease;
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid rgba(0,0,0,0.28);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  transition: width .3s ease, height .3s ease, border-color .3s ease, opacity .3s ease;
}
body.cursor-hover .cursor { width: 46px; height: 46px; background: rgba(220,38,38,0.18); }
body.cursor-hover .cursor-ring { width: 46px; height: 46px; border-color: var(--accent); opacity: 0; }

/* ── Nav ── */
.tech-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.tech-logo { transition: opacity .2s ease, transform .2s ease; }
.tech-logo:hover { opacity: .65; }
.tech-logo .mark { color: var(--accent); }

.nav-link { color: var(--ink); transition: color .2s ease; }
.nav-link .hash { color: var(--accent); }
.nav-link:hover, .nav-link.active { color: var(--accent); }

.switch-hint {
  font-size: 9px;
  letter-spacing: .15em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ── Buttons ── */
.btn-outline {
  border: 1px solid var(--ink);
  padding: 11px 20px;
  font-size: .78rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all .25s ease;
  background: transparent;
  cursor: pointer;
}
.btn-outline:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-accent {
  border: 1px solid var(--accent);
  padding: 11px 20px;
  font-size: .78rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  transition: all .25s ease;
}
.btn-accent:hover { background: var(--accent); color: #fff; }

/* ── Section heading ── */
.section-head { display: flex; align-items: center; gap: 18px; }
.section-head h2 { font-size: 1.6rem; font-weight: 700; white-space: nowrap; }
.section-head h2 .hash { color: var(--accent); }
.section-head .line { height: 1px; background: var(--accent); flex: 1; opacity: .45; }
.section-head .view-all { color: var(--ink); font-size: .8rem; white-space: nowrap; transition: color .2s; }
.section-head .view-all:hover { color: var(--accent); }

/* ── Decorations ── */
.deco-square { position: absolute; border: 1px solid var(--accent); opacity: .3; pointer-events: none; }
.dot-grid {
  background-image: radial-gradient(var(--muted) 1.3px, transparent 1.3px);
  background-size: 12px 12px;
  opacity: .35;
  pointer-events: none;
}

/* ── Hero ── */
.hero-img-wrap { position: relative; }
.hero-img-wrap img {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 360px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 9px 16px;
  font-size: .8rem;
}
.hero-badge .sq { width: 11px; height: 11px; background: var(--accent); display: inline-block; }

/* ── Social rail (left) ── */
.social-rail {
  position: fixed;
  left: 28px;
  top: 0;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  z-index: 40;
}
.social-rail .rail-line { width: 1px; height: 90px; background: var(--border); }
.social-rail a { color: var(--muted); transition: color .2s, transform .2s; }
.social-rail a:hover { color: var(--accent); transform: translateY(-2px); }

/* ── Quote ── */
.quote-box { border: 1px solid var(--ink); position: relative; padding: 34px 38px; }
.quote-mark { position: absolute; font-size: 3rem; line-height: 0; color: var(--ink); font-weight: 700; }
.quote-mark.start { top: 26px; left: 16px; }
.quote-mark.end { bottom: 4px; right: 18px; }
.quote-attr {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 6px 16px;
  margin-top: 22px;
  font-size: .85rem;
}

/* ── Project cards ── */
.project-card {
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 34px rgba(0,0,0,.09);
  border-color: var(--accent);
}
.project-thumb {
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}
.project-thumb .pt-bar {
  display: flex; gap: 6px; padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.project-thumb .pt-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d4d4d4; display: inline-block; }
.project-thumb .pt-label {
  position: absolute; inset: 0; top: 30px;
  display: flex; align-items: center; justify-content: center;
  color: #c2c2c2; font-size: .9rem; font-weight: 700; letter-spacing: .05em;
}
.project-body { padding: 18px 18px 22px; }
.project-tags { color: var(--muted); font-size: .72rem; margin-bottom: 14px; line-height: 1.5; }
.project-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.project-desc { color: var(--muted); font-size: .78rem; line-height: 1.65; margin-bottom: 18px; }

/* ── Skills grid ── */
.skill-card {
  border: 1px solid var(--border);
  background: var(--bg);
  aspect-ratio: 1 / 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.skill-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 10px 24px rgba(0,0,0,.07); }
.skill-card i { font-size: 2.4rem; }
.skill-card .skill-fallback { font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.skill-card span { font-size: .78rem; color: var(--muted); }

/* ── About: code window placeholder ── */
.code-window { border: 1px solid var(--border); background: var(--bg-alt); width: 100%; max-width: 440px; }
.cw-bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: #fff; }
.cw-bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.cw-bar i:nth-child(1) { background: #ef4444; }
.cw-bar i:nth-child(2) { background: #f59e0b; }
.cw-bar i:nth-child(3) { background: #22c55e; }
.cw-body { padding: 20px 22px; font-size: .82rem; line-height: 1.8; overflow-x: auto; }
.cw-body .tok-key { color: var(--accent); }
.cw-body .tok-str { color: #15803d; }
.cw-body .tok-mut { color: var(--muted); }

/* ── Contact card ── */
.contact-card { border: 1px solid var(--border); background: var(--bg); padding: 22px 24px; }
.contact-row { display: flex; align-items: center; gap: 12px; font-size: .85rem; color: var(--ink); padding: 8px 0; }
.contact-row svg { color: var(--accent); flex-shrink: 0; }

/* ── Footer ── */
.tech-footer { background: var(--bg-alt); border-top: 1px solid var(--border); }
.tech-footer a { color: var(--muted); transition: color .2s, transform .2s; }
.tech-footer a:hover { color: var(--accent); }

/* ── Reveal on scroll ──
   Only hide reveals when JS is active (html.js-on). Without JS — or if the
   IntersectionObserver never fires — content stays fully visible. */
html.js-on .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); transition-delay: var(--d, 0s); }
html.js-on .reveal.in { opacity: 1; transform: translateY(0); }

/* ── Hamburger icon ── */
.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s ease, opacity .2s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile menu (overlays the page, anchored under the sticky nav) ── */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 16px 30px rgba(0,0,0,.10);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 13px 4px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: 0; }

/* ══════════ RESPONSIVE ══════════ */
@media (max-width: 1024px) {
  .social-rail { display: none !important; }
}
@media (max-width: 768px) {
  .hero-img-wrap img { max-width: 300px; }
  .section-head h2 { font-size: 1.3rem; }
}
