/* ==========================================================================
   Portfolio — Main stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  --cream: #f0ece4;
  --cream2: #e6e0d6;
  --dark: #111;
  --dark2: #1c1c1c;
  --text: #1a1a1a;
  --muted: #666;
  --dim: #999;
  --accent: #7c3aed;
  --red: #c0392b;
  --r: 22px;
  --rs: 14px;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* --------------------------------------------------------------------------
   4. Navigation
   -------------------------------------------------------------------------- */
.site-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 10px 8px 14px;
  background: var(--dark);
  border-radius: 100px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.site-nav .n-logo {
  width: 30px;
  height: 30px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  margin-right: 10px;
  flex-shrink: 0;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 100px;
  transition: all 0.2s;
}

.site-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.site-nav .n-cta {
  background: #fff !important;
  color: var(--dark) !important;
  font-weight: 600 !important;
  margin-left: 6px;
  padding: 7px 18px !important;
}

.site-nav .n-cta:hover {
  background: #e8e8e8 !important;
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: 140px 0 70px;
  text-align: center;
}

.hero h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(56px, 9vw, 100px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 18px;
}

.hero-sub {
  color: var(--muted);
  font-size: 17px;
  max-width: 480px;
  margin: 0 auto 52px;
}

.type-cursor {
  display: inline-block;
  margin-left: 2px;
  color: var(--text);
  font-weight: 300;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}


.editor {
  background: #1e1e1e;
  border-radius: var(--r);
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
  text-align: left;
}

.ebar {
  background: #2d2d2d;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.r {
  background: #ff5f57;
}

.dot.y {
  background: #febc2e;
}

.dot.g {
  background: #28c840;
}

.etab {
  margin-left: 12px;
  background: #1e1e1e;
  color: #888;
  font-size: 12px;
  font-family: "JetBrains Mono", monospace;
  padding: 4px 14px;
  border-radius: 4px 4px 0 0;
}

.ebody {
  padding: 26px 30px 30px;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  line-height: 2;
}

.ln {
  color: #3d3d3d;
  user-select: none;
  margin-right: 24px;
  display: inline-block;
  width: 18px;
  text-align: right;
}

.kw {
  color: #569cd6;
}

.fn {
  color: #dcdcaa;
}

.st {
  color: #ce9178;
}

.cm {
  color: #6a9955;
}

.prop {
  color: #9cdcfe;
}

.cls {
  color: #4ec9b0;
}

.wh {
  color: #d4d4d4;
}

.br {
  display: block;
}

/* --------------------------------------------------------------------------
   6. Ticker
   -------------------------------------------------------------------------- */
.ticker {
  padding: 30px 0;
  overflow: hidden;
  border-top: 1px solid var(--cream2);
  border-bottom: 1px solid var(--cream2);
}

.ticker-track {
  display: flex;
  animation: tick 30s linear infinite;
  width: max-content;
}

.titem {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--dim);
  padding: 0 32px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 32px;
}

.titem::after {
  content: "·";
  font-size: 22px;
}

@keyframes tick {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* --------------------------------------------------------------------------
   7. Always building
   -------------------------------------------------------------------------- */
.always {
  padding: 120px 0 80px;
}

.always-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.always-left h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(50px, 7vw, 82px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 18px;
}

.always-left p {
  color: var(--muted);
  font-size: 16px;
  max-width: 340px;
  line-height: 1.7;
}

.scatter {
  position: relative;
  height: 500px;
}

.pcard {
  position: absolute;
  background: var(--dark);
  border-radius: 18px;
  padding: 22px 24px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  display: block;
  min-width: 185px;
  max-width: 210px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.22);
}

.pcard:hover {
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
  transform: translateY(-8px) rotate(0deg) !important;
}

.picon {
  font-size: 22px;
  margin-bottom: 10px;
  display: block;
}

.pname {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.ptags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ptag {
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.07);
  padding: 3px 8px;
  border-radius: 4px;
}

.parr {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.2s;
}

.pcard:hover .parr {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.pcard.uc {
  background: #141420;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  cursor: default;
}

.pcard:nth-child(1) {
  top: 0;
  left: 5px;
  transform: rotate(-2.5deg);
}

.pcard:nth-child(2) {
  top: 10px;
  right: 0;
  transform: rotate(2deg);
}

.pcard:nth-child(3) {
  top: 195px;
  left: 0;
  transform: rotate(1.5deg);
}

.pcard:nth-child(4) {
  top: 210px;
  right: 20px;
  transform: rotate(-2deg);
}

.pcard:nth-child(5) {
  bottom: 10px;
  left: 90px;
  transform: rotate(1deg);
}

/* --------------------------------------------------------------------------
   8. Statement
   -------------------------------------------------------------------------- */
.statement {
  padding: 110px 0;
  text-align: center;
  border-top: 1px solid var(--cream2);
}

.statement p {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: var(--text);
  max-width: 860px;
  margin: 0 auto;
}

.statement em {
  color: var(--muted);
  font-style: normal;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   9. Feature (education & experience)
   -------------------------------------------------------------------------- */
.feature {
  padding: 80px 0;
  border-top: 1px solid var(--cream2);
}

.fi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.fleft {
  position: sticky;
  top: 120px;
}

.fvisual {
  background: var(--dark2);
  border-radius: var(--r);
  padding: 44px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

.fvisual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(124, 58, 237, 0.35) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(192, 57, 43, 0.2) 0%, transparent 55%);
}

.fvisual--dark {
  background: #0e0e0e;
}

.fv-lbl {
  position: relative;
  z-index: 1;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 10px;
}

.fv-ttl {
  position: relative;
  z-index: 1;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
}

.fright {
  padding-top: 4px;
}

.fh {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 40px;
}

.fitems {
  display: flex;
  flex-direction: column;
}

.fitem {
  padding: 26px 0 26px 28px;
  border-left: 2px solid var(--cream2);
  transition: border-color 0.3s;
}

.fitem.active {
  border-left-color: var(--red);
}

.ft {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  transition: color 0.3s;
}

.fitem.active .ft {
  color: var(--text);
}

.fitem:not(.active) .ft {
  color: var(--dim);
}

.fs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.fd {
  font-size: 13.5px;
  color: var(--dim);
  line-height: 1.65;
  max-width: 400px;
}

.fitem:not(.active) .fd {
  display: none;
}

.fbadge {
  display: inline-block;
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  color: var(--accent);
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  padding: 3px 9px;
  border-radius: 4px;
  margin-top: 8px;
}

/* Sub-timeline for nested roles (LinkedIn style) */
.sub-timeline {
  margin-top: 16px;
  position: relative;
  padding-left: 20px;
  border-left: 1px dashed var(--cream2);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sub-item {
  position: relative;
}

.sub-dot {
  position: absolute;
  left: -26px; /* center it on the dashed line */
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cream2);
  border: 2px solid var(--cream);
  transition: all 0.3s;
}

.sub-item.active .sub-dot {
  background: var(--red);
  box-shadow: 0 0 8px rgba(192, 57, 43, 0.4);
}

.sub-role {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.sub-date {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.sub-badge {
  font-size: 9px;
  font-family: "JetBrains Mono", monospace;
  color: var(--accent);
  background: rgba(124, 58, 237, 0.1);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
}

.sub-desc {
  font-size: 13px;
  color: var(--dim);
  line-height: 1.6;
}


/* --------------------------------------------------------------------------
   10. Projects
   -------------------------------------------------------------------------- */
.projects {
  padding: 100px 0;
}

.ph {
  margin-bottom: 44px;
}

.ph h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.ptabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ptab {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid var(--cream2);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: "DM Sans", sans-serif;
}

.ptab.active {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}

.ptab:hover:not(.active) {
  background: var(--cream2);
}

.pgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.pj {
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  text-decoration: none;
  transition: transform 0.3s;
}

.pj:hover {
  transform: scale(1.015);
}

.pj::before {
  content: "";
  position: absolute;
  inset: 0;
}

.pj.c1::before {
  background: radial-gradient(circle at 20% 30%, #4c1d95 0%, #1a0533 40%, #080808 100%);
}

.pj.c2::before {
  background: radial-gradient(circle at 70% 20%, #7c2d12 0%, #1c0a00 40%, #080808 100%);
}

.pj.c3::before {
  background: radial-gradient(circle at 40% 60%, #064e3b 0%, #001510 40%, #080808 100%);
}

.pj.c4::before {
  background: radial-gradient(circle at 80% 70%, #1e3a5f 0%, #05101a 40%, #080808 100%);
}

.pjb {
  position: relative;
  z-index: 1;
}

.pjbadge {
  display: inline-block;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.07);
  padding: 4px 10px;
  border-radius: 5px;
  margin-bottom: 14px;
}

.pjtitle {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 8px;
}

.pjdesc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  max-width: 380px;
}

.pjfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}

.pjtags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pjtag {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 9px;
  border-radius: 5px;
}

.pjarr {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.pj:hover .pjarr {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.pj.wide {
  grid-column: span 2;
}

/* --------------------------------------------------------------------------
   11. Quote
   -------------------------------------------------------------------------- */
.quote {
  padding: 130px 0;
  text-align: center;
  border-top: 1px solid var(--cream2);
}

.quote blockquote {
  margin: 0;
  padding: 0;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qtext {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(30px, 5.5vw, 62px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
  color: var(--text);
  max-width: 900px;
  margin: 0 auto 36px !important;
  text-align: center !important;
}

.qattr {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.qavatar {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #1e1e1e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.qname {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  text-align: left;
}

.qrole {
  font-size: 13px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   12. Socials / contact
   -------------------------------------------------------------------------- */
.socials {
  padding: 80px 0;
  border-top: 1px solid var(--cream2);
  text-align: center;
}

.socials h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}

.socials p {
  color: var(--muted);
  margin-bottom: 38px;
  font-size: 16px;
}

.srow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.slink {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 24px;
  background: var(--dark);
  color: #fff;
  border-radius: 100px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.slink:hover {
  background: #2a2a2a;
  transform: translateY(-2px);
}

.slink svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.slink.lt {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--cream2);
}

.slink.lt:hover {
  background: var(--cream2);
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--dark);
  border-radius: 24px 24px 0 0;
  padding: 60px 0 40px;
  margin-top: 0;
}

.finner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.fbrand .fl {
  width: 36px;
  height: 36px;
  background: #222;
  border: 1px solid #333;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  margin-bottom: 14px;
}

.fbrand p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.65;
  max-width: 200px;
}

.fcol h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 16px;
}

.fcol a {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.fcol a:hover {
  color: #fff;
}

.fbot {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fbot p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.2);
  font-family: "JetBrains Mono", monospace;
}

/* --------------------------------------------------------------------------
   14. Utilities (scroll reveal)
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal--delay-1 {
  transition-delay: 0.05s;
}

.reveal--delay-2 {
  transition-delay: 0.1s;
}

.reveal--delay-3 {
  transition-delay: 0.15s;
}

.reveal--delay-4 {
  transition-delay: 0.2s;
}

/* --------------------------------------------------------------------------
   15. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .always-inner,
  .fi,
  .finner {
    grid-template-columns: 1fr;
  }

  .scatter {
    height: 340px;
    margin-top: 40px;
  }

  .fleft {
    position: static;
  }

  .pgrid {
    grid-template-columns: 1fr;
  }

  .pj.wide {
    grid-column: span 1;
  }
}

@media (max-width: 600px) {
  .site-nav a:not(.n-cta) {
    display: none;
  }

  .finner {
    grid-template-columns: 1fr 1fr;
  }
}
/* ── RESPONSIVE OVERRIDES ── */

@media (max-width: 900px) {
  .always-inner, .fi { grid-template-columns: 1fr; }
  .fleft { position: static; }
  .fvisual { min-height: 220px; padding: 28px; }
  .fv-ttl { font-size: 26px; }
  .pgrid { grid-template-columns: 1fr; }
  .pj.wide { grid-column: span 1; }
  .pj { min-height: 240px; }
  .finner { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 768px) {
  .scatter {
    position: static; height: auto;
    display: flex; flex-direction: column; gap: 14px;
  }
  .pcard {
    position: static; transform: none !important;
    max-width: 100%; min-width: unset;
  }
  .hero { padding: 110px 0 50px; }
  .always { padding: 80px 0 60px; }
  .statement { padding: 70px 0; }
  .quote { padding: 80px 0; }
  .socials { padding: 60px 0; }
}

@media (max-width: 600px) {
  nav a:not(.n-cta) { display: none; }
  .ebody { padding: 16px 16px 20px; font-size: 12px; overflow-x: auto; }
  .wrap { padding: 0 20px; }
  .srow { flex-direction: column; align-items: stretch; }
  .slink { justify-content: center; }
}

@media (max-width: 480px) {
  .finner { grid-template-columns: 1fr; }
  .fbot { flex-direction: column; gap: 8px; text-align: center; }
  .ptabs { gap: 6px; }
  .ptab { padding: 7px 14px; font-size: 12.5px; }
}
