/* =============================================
   DEVADARSH ANOOP — PORTFOLIO
   Main Stylesheet
   ============================================= */

/* ---------- design tokens ---------- */
:root {
  --bg:           #09090a;
  --bg-1:         #0f0f10;
  --bg-2:         #141415;
  --ink:          #f3f2ee;
  --ink-dim:      #8b8b87;
  --ink-faint:    #4a4a48;
  --line:         rgba(243, 242, 238, 0.09);
  --line-strong:  rgba(243, 242, 238, 0.16);
  --green:        #baff3e;
  --green-dim:    #7fa832;
  --red:          #ff4433;
  --red-dim:      #a83329;
  --mono:         'JetBrains Mono', ui-monospace, monospace;
  --display:      'Space Grotesk', 'Space Grotesk Fallback', sans-serif;
  --accent:       var(--green);
  --ease:         cubic-bezier(.19, 1, .22, 1);
}

/* ---------- reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--bg); }

body {
  background:   var(--bg);
  color:        var(--ink);
  font-family:  var(--display);
  font-size:    16px;
  line-height:  1.5;
  overflow-x:   hidden;
  cursor:       none;
}

@media (max-width: 860px), (hover: none) {
  body { cursor: auto; }
}

::selection { background: var(--green); color: #0a0a0a; }

a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
img { max-width: 100%; display: block; }

.mono { font-family: var(--mono); }

/* ---------- layout helpers ---------- */
.wrap {
  max-width: 1320px;
  margin:    0 auto;
  padding:   0 clamp(20px, 5vw, 64px);
}

section { position: relative; }

.eyebrow {
  font-family:    var(--mono);
  font-size:      12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color:          var(--ink-dim);
  display:        flex;
  align-items:    center;
  gap:            10px;
}

.eyebrow::before {
  content:       '';
  width:         7px;
  height:        7px;
  background:    var(--accent);
  display:       inline-block;
  border-radius: 1px;
  box-shadow:    0 0 8px var(--accent);
}

/* ---------- grain overlay ---------- */
.grain {
  position:       fixed;
  inset:          0;
  z-index:        60;
  pointer-events: none;
  opacity:        .05;
  mix-blend-mode: overlay;
}

/* ---------- custom cursor ---------- */
.cur {
  position:        fixed;
  top:             0;
  left:            0;
  z-index:         90;
  pointer-events:  none;
  width:           8px;
  height:          8px;
  background:      var(--accent);
  border-radius:   50%;
  transform:       translate(-50%, -50%);
  transition:      background .3s var(--ease);
}

.cur-ring {
  position:        fixed;
  top:             0;
  left:            0;
  z-index:         89;
  pointer-events:  none;
  width:           34px;
  height:          34px;
  border:          1px solid var(--line-strong);
  border-radius:   50%;
  transform:       translate(-50%, -50%);
  transition:      width .25s var(--ease),
                   height .25s var(--ease),
                   border-color .25s var(--ease),
                   opacity .25s;
}

.cur-ring.big { width: 64px; height: 64px; border-color: var(--accent); }

@media (max-width: 860px), (hover: none) {
  .cur, .cur-ring { display: none; }
}

/* ---------- corner marks ---------- */
.corner {
  position:       fixed;
  width:          16px;
  height:         16px;
  z-index:        40;
  pointer-events: none;
  opacity:        .5;
}

.corner::before,
.corner::after {
  content:    '';
  position:   absolute;
  background: var(--ink-faint);
}

.corner::before { width: 100%; height: 1px; top: 50%; }
.corner::after  { height: 100%; width: 1px; left: 50%; }

.corner.tl { top: 18px;    left:  18px;   }
.corner.tr { top: 18px;    right: 18px;   }
.corner.bl { bottom: 18px; left:  18px;   }
.corner.br { bottom: 18px; right: 18px;   }

/* ---------- nav ---------- */
header.site {
  position:        fixed;
  top:             0;
  left:            0;
  right:           0;
  z-index:         50;
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         22px clamp(20px, 5vw, 64px);
  font-family:     var(--mono);
  font-size:       13px;
  letter-spacing:  .04em;
  background:      linear-gradient(to bottom, rgba(9, 9, 10, .85), transparent);
  backdrop-filter: blur(2px);
}

.brand {
  font-weight:  500;
  display:      flex;
  align-items:  center;
  gap:          8px;
}

.brand .dot {
  width:         7px;
  height:        7px;
  background:    var(--accent);
  border-radius: 50%;
  box-shadow:    0 0 10px var(--accent);
  animation:     blink 2.2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1;   }
  50%       { opacity: .25; }
}

nav.links { display: flex; gap: 34px; }

nav.links a {
  position:       relative;
  color:          var(--ink-dim);
  text-transform: lowercase;
  transition:     color .25s;
}

nav.links a::after {
  content:    '';
  position:   absolute;
  left:       0;
  bottom:     -5px;
  width:      0;
  height:     1px;
  background: var(--accent);
  transition: width .25s var(--ease);
}

nav.links a:hover          { color: var(--ink); }
nav.links a:hover::after   { width: 100%; }

@media (max-width: 760px) { nav.links { display: none; } }

.nav-cta {
  border:     1px solid var(--line-strong);
  padding:    8px 16px;
  color:      var(--ink);
  transition: border-color .25s, color .25s, background .25s;
}

.nav-cta:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 760px) { .nav-cta { font-size: 11px; padding: 7px 12px; } }

/* ---------- hero ---------- */
.hero {
  min-height:      100svh;
  display:         flex;
  flex-direction:  column;
  justify-content: center;
  padding-top:     110px;
  padding-bottom:  60px;
  position:        relative;
}

.hero-grid {
  position:   absolute;
  inset:      0;
  z-index:    0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 10%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 10%, transparent 75%);
  opacity: .6;
}

.hero-inner { position: relative; z-index: 1; }

.hero h1 {
  font-family:    var(--display);
  font-weight:    700;
  font-size:      clamp(2.6rem, 8.4vw, 6.6rem);
  line-height:    .96;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.hero h1 .accent    { color: var(--accent); }
.hero h1 small-line { display: block; }

.hero-sub {
  margin-top:            28px;
  display:               grid;
  grid-template-columns: 1fr auto;
  gap:                   40px;
  align-items:           end;
}

@media (max-width: 820px) { .hero-sub { grid-template-columns: 1fr; } }

/* terminal widget */
.term {
  font-family:   var(--mono);
  font-size:     14px;
  color:         var(--ink-dim);
  background:    var(--bg-1);
  border:        1px solid var(--line);
  border-radius: 6px;
  padding:       18px 20px;
  max-width:     520px;
  min-height:    150px;
  overflow-wrap: break-word;
  word-break:    break-word;
}

.term .l { color: var(--ink-dim); }
.term .p { color: var(--accent);  }
.term .v { color: var(--ink);     }

.term .cursor {
  display:        inline-block;
  width:          7px;
  height:         14px;
  background:     var(--accent);
  margin-left:    2px;
  vertical-align: -2px;
  animation:      blink 1s steps(2) infinite;
}

.hero-meta {
  font-family:  var(--mono);
  font-size:    12px;
  color:        var(--ink-faint);
  text-align:   right;
  max-width:    220px;
  justify-self: end;
  line-height:  1.7;
}

@media (max-width: 820px) { .hero-meta { text-align: left; justify-self: start; } }

/* scroll cue */
.scroll-cue {
  position:       absolute;
  bottom:         24px;
  left:           clamp(20px, 5vw, 64px);
  font-family:    var(--mono);
  font-size:      11px;
  color:          var(--ink-faint);
  display:        flex;
  align-items:    center;
  gap:            10px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.scroll-cue .line {
  width:      1px;
  height:     36px;
  background: linear-gradient(var(--ink-faint), transparent);
  animation:  down 1.8s infinite;
}

@keyframes down {
  0%     { transform: scaleY(0); transform-origin: top;    }
  50%    { transform: scaleY(1); transform-origin: top;    }
  50.01% {                       transform-origin: bottom; }
  100%   { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- marquee ---------- */
.marquee {
  border-top:    1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding:       16px 0;
  overflow:      hidden;
  white-space:   nowrap;
  background:    var(--bg-1);
}

.marquee-track {
  display:     inline-flex;
  gap:         48px;
  animation:   scroll 32s linear infinite;
  will-change: transform;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-track span {
  font-family:    var(--mono);
  font-size:      13px;
  letter-spacing: .08em;
  color:          var(--ink-faint);
  text-transform: uppercase;
  display:        inline-flex;
  align-items:    center;
  gap:            48px;
}

.marquee-track span em { color: var(--accent); font-style: normal; }

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

/* ---------- section heads ---------- */
.shead {
  padding:         120px 0 56px;
  display:         flex;
  justify-content: space-between;
  align-items:     flex-end;
  gap:             24px;
  flex-wrap:       wrap;
}

@media (max-width: 760px) {
  .shead { padding: 80px 0 40px; }
}

.shead h2 {
  font-family:    var(--display);
  font-weight:    600;
  text-transform: uppercase;
  font-size:      clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -.01em;
  margin-top:     10px;
}

.shead p {
  max-width:      360px;
  color:          var(--ink-dim);
  font-size:      14.5px;
  padding-bottom: 6px;
}

/* ---------- work cards ---------- */
.work-list {
  display:        flex;
  flex-direction: column;
  border-top:     1px solid var(--line);
}

.work-card {
  display:               grid;
  grid-template-columns: 90px 1fr auto;
  align-items:           center;
  gap:                   28px;
  padding:               38px 0;
  border-bottom:         1px solid var(--line);
  position:              relative;
  overflow:              hidden;
}

.work-card::before {
  content:    '';
  position:   absolute;
  inset:      0;
  left:       -100%;
  background: linear-gradient(90deg, transparent, rgba(186, 255, 62, .07), transparent);
  transition: left .6s var(--ease);
}

.work-card:hover::before { left: 100%; }

.work-num {
  font-family: var(--mono);
  color:       var(--ink-faint);
  font-size:   13px;
}

.work-main h3 {
  font-family:    var(--display);
  font-weight:    600;
  font-size:      clamp(1.5rem, 3.4vw, 2.5rem);
  text-transform: uppercase;
  letter-spacing: -.01em;
  display:        flex;
  align-items:    center;
  gap:            14px;
  flex-wrap:      wrap;
}

.work-main h3 .tag {
  font-family:    var(--mono);
  font-size:      10.5px;
  font-weight:    400;
  letter-spacing: .08em;
  color:          var(--accent);
  border:         1px solid var(--green-dim);
  padding:        3px 8px;
  border-radius:  20px;
  text-transform: uppercase;
}

.work-main p { color: var(--ink-dim); font-size: 14.5px; margin-top: 10px; max-width: 520px; }
.work-stack  { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); margin-top: 12px; letter-spacing: .03em; }

.work-link {
  font-family:     var(--mono);
  font-size:       12.5px;
  color:           var(--ink);
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             8px;
  white-space:     nowrap;
  border:          1px solid var(--line-strong);
  padding:         10px 16px;
  border-radius:   30px;
  min-width:       140px;
  transition:      border-color .25s, color .25s, transform .25s var(--ease);
}

.work-card:hover .work-link {
  border-color: var(--accent);
  color:        var(--accent);
  transform:    translateX(4px);
}

@media (max-width: 760px) {
  .work-card { grid-template-columns: 1fr; gap: 14px; padding: 28px 0; }
  .work-num  { order: -1; }
  .raven-links { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .raven-links .work-link { flex: 1 1 calc(50% - 4px); min-width: auto; justify-content: center; }
}

/* ---------- lab (red mode) ---------- */
.lab {
  --accent: var(--red);
  background:
    radial-gradient(ellipse 60% 50% at 15% 0%, rgba(255, 68, 51, .09), transparent 60%),
    var(--bg-2);
  border-top:    1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.lab .shead p { color: var(--ink-dim); }
.lab-list     { border-top: 1px solid var(--line); }

.lab-row {
  display:               grid;
  grid-template-columns: 150px 1fr 120px;
  gap:                   20px;
  align-items:           center;
  padding:               22px 0;
  border-bottom:         1px solid var(--line);
  font-family:           var(--mono);
}

.lab-status {
  font-size:      11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color:          var(--red);
  display:        flex;
  align-items:    center;
  gap:            8px;
}

.lab-status::before {
  content:       '';
  width:         6px;
  height:        6px;
  background:    var(--red);
  border-radius: 50%;
  box-shadow:    0 0 8px var(--red);
  animation:     blink 1.6s infinite;
}

.lab-name { font-family: var(--display); font-size: 1.15rem; text-transform: uppercase; font-weight: 600; }
.lab-desc { color: var(--ink-dim); font-size: 13px; font-family: var(--mono); margin-top: 4px; }
.lab-year { text-align: right; color: var(--ink-faint); font-size: 12px; }

@media (max-width: 700px) {
  .lab-row  { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 0; }
  .lab-year { order: -1; color: var(--ink-faint); margin-bottom: 2px; }
  .lab-status { margin-bottom: 4px; }
}

.lab-note {
  font-family:  var(--mono);
  font-size:    12px;
  color:        var(--ink-faint);
  padding:      26px 0 60px;
  max-width:    520px;
  line-height:  1.8;
}

.lab-note .red { color: var(--red); }

/* ---------- about ---------- */
.about { padding-bottom: 40px; }

.about-grid {
  display:               grid;
  grid-template-columns: 1.1fr .9fr;
  gap:                   60px;
  border-top:            1px solid var(--line);
  padding-top:           56px;
}

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

.about-text p      { font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.55; color: var(--ink); font-weight: 400; }
.about-text p + p  { margin-top: 22px; color: var(--ink-dim); font-size: 1rem; }
.about-text .hl    { color: var(--green); font-family: var(--mono); font-size: .62em; vertical-align: 2px; }

.stack-group { margin-bottom: 26px; }

.stack-group h4 {
  font-family:    var(--mono);
  font-size:      11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color:          var(--ink-faint);
  margin-bottom:  12px;
}

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

.pill {
  font-family:   var(--mono);
  font-size:     12px;
  color:         var(--ink-dim);
  border:        1px solid var(--line);
  padding:       6px 12px;
  border-radius: 20px;
  transition:    border-color .2s, color .2s;
}

.pill:hover { border-color: var(--green-dim); color: var(--green); }

/* ---------- activity log ---------- */
.log      { padding-top: 110px; }
.log-list { border-top: 1px solid var(--line); max-width: 820px; }

.log-row {
  display:               grid;
  grid-template-columns: 130px 110px 1fr;
  gap:                   18px;
  padding:               16px 0;
  border-bottom:         1px solid var(--line);
  font-family:           var(--mono);
  font-size:             13px;
}

.log-date { color: var(--ink-faint); }

.log-tag {
  color:          var(--green);
  text-transform: uppercase;
  font-size:      11px;
  letter-spacing: .06em;
  align-self:     start;
  margin-top:     2px;
}

.log-desc { color: var(--ink-dim); }

@media (max-width: 640px) {
  .log-row { display: flex; flex-wrap: wrap; gap: 6px; column-gap: 14px; }
  .log-desc { width: 100%; margin-top: 4px; }
}

/* ---------- contact / footer ---------- */
footer {
  padding:    140px 0 40px;
  border-top: 1px solid var(--line);
  margin-top: 100px;
}

@media (max-width: 760px) {
  footer { padding: 80px 0 30px; margin-top: 60px; }
}

.cta {
  font-family:    var(--display);
  font-weight:    700;
  text-transform: uppercase;
  font-size:      clamp(2.4rem, 8vw, 6rem);
  line-height:    .98;
  letter-spacing: -.02em;
  display:        inline-flex;
  align-items:    center;
  gap:            .35em;
}

.cta:hover .arrow { transform: translate(10px, -10px); }
.cta .arrow       { display: inline-block; transition: transform .3s var(--ease); color: var(--green); }
.cta-sub          { font-family: var(--mono); color: var(--ink-dim); margin-top: 18px; font-size: 14px; max-width: 420px; }

/* ---------- contact cards ---------- */
.contact-grid {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   16px;
  margin-top:            50px;
}

.contact-card {
  display:         flex;
  flex-direction:  column;
  justify-content: space-between;
  gap:             34px;
  padding:         22px 24px;
  border:          1px solid var(--line);
  border-radius:   12px;
  background:      var(--bg-1);
  transition:      background .3s var(--ease), border-color .3s;
}

.contact-card:hover {
  background:   var(--bg-2);
  border-color: var(--line-strong);
}

.cc-top {
  display:         flex;
  align-items:     flex-start;
  justify-content: space-between;
}

.cc-label {
  font-family:    var(--mono);
  font-size:      11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color:          var(--ink-faint);
}

.cc-arrow {
  font-family: var(--mono);
  font-size:   16px;
  color:       var(--ink-faint);
  transition:  transform .3s var(--ease), color .3s;
}

.contact-card:hover .cc-arrow {
  transform: translate(4px, -4px);
  color:     var(--green);
}

.cc-platform {
  font-family:    var(--mono);
  font-size:      10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color:          var(--green);
  margin-bottom:  6px;
}

.cc-handle {
  font-family:    var(--display);
  font-weight:    600;
  font-size:      1.15rem;
  letter-spacing: -.01em;
  word-break:     break-word;
}

.foot-grid {
  display:         flex;
  justify-content: center;
  margin-top:      60px;
  padding-top:     26px;
  border-top:      1px solid var(--line);
  font-family:     var(--mono);
  font-size:       12.5px;
  color:           var(--ink-faint);
}

.foot-center {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            6px;
  text-align:     center;
}

.foot-tagline {
  color: var(--ink-dim);
}

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

/* ---------- scroll reveal initial state ---------- */
.reveal { opacity: 0; transform: translateY(28px); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- client work disclosure note ---------- */
.work-disclosure {
  font-family:    var(--mono);
  font-size:      11px;
  color:          var(--ink-faint);
  letter-spacing: .04em;
  padding:        20px 0 2px;
  border-top:     1px solid var(--line);
  margin-top:     8px;
  max-width:      600px;
  line-height:    1.7;
}

.work-disclosure .disc-dot {
  display:        inline-block;
  width:          5px;
  height:         5px;
  background:     var(--ink-faint);
  border-radius:  50%;
  margin-right:   7px;
  vertical-align: 2px;
}

/* ---------- raveneye third-column button group ---------- */
.raven-links {
  display:        flex;
  flex-direction: column;
  align-items:    stretch;
  gap:            10px;
}

.raven-links .work-link {
  width:           140px;
  justify-content: space-between;
  transition:      background .25s, border-color .25s, color .25s;
}

.work-card:hover .raven-links .work-link {
  transform: none; /* Disable the global shift for these buttons so they don't look weird when stacked */
}

.raven-links .work-link:hover {
  border-color: var(--accent);
  color:        var(--accent);
  background:   rgba(186, 255, 62, .05);
}
