/* =========================================================
   AYUS DAS — PORTFOLIO
   Palette: warm pastel yellow, amber accent, warm ink
   Type: Space Grotesk (display) / Inter (body) / JetBrains Mono (data)
   ========================================================= */

:root{
  --bg:            #FFFCF3;
  --bg-alt:        #FFF6DC;
  --card:          #FFFFFF;
  --card-line:     #EFE2B0;

  --yellow-100:    #FFF3C4;
  --yellow-200:    #FFE9A3;
  --yellow-300:    #FFDE7E;
  --yellow-500:    #F5C542;
  --amber-600:     #E29A2E;
  --amber-700:     #C57F1D;

  --ink:           #2B2620;
  --ink-soft:      #6B6355;
  --ink-faint:     #A79E88;

  --accent-sage:   #BFD8B8;
  --accent-clay:   #E7A98B;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --ease: cubic-bezier(.22,1,.36,1);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after{ box-sizing: border-box; }

html{
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

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

::selection{
  background: var(--yellow-300);
  color: var(--ink);
}

a{ color: inherit; text-decoration: none; }
ul, ol{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3{ margin: 0; font-family: var(--font-display); }
p{ margin: 0; }

:focus-visible{
  outline: 2px solid var(--amber-700);
  outline-offset: 3px;
  border-radius: 4px;
}

/* subtle grain overlay for texture */
.grain{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: .035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================================================
   NAV
   ========================================================= */
.nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .3s var(--ease);
}
.nav.is-scrolled{
  background: rgba(255, 252, 243, .82);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--card-line);
  padding: 12px 0;
}
.nav__inner{
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
}
.nav__mark{
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--yellow-500);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 2px 0 var(--amber-700);
}
.nav__name{ font-size: 15px; }

.nav__links{
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav__links a{
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color .25s var(--ease);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.nav__links a .idx{
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
}
.nav__links a:hover{ color: var(--ink); }
.nav__links a:not(.nav__cta)::after{
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0%;
  height: 1.5px;
  background: var(--amber-700);
  transition: width .3s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after{ width: 100%; }

.nav__cta{
  background: var(--ink);
  color: var(--yellow-100) !important;
  padding: 9px 18px;
  border-radius: 100px;
  font-weight: 600 !important;
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.nav__cta:hover{ background: var(--amber-700); transform: translateY(-1px); }

.nav__toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: var(--yellow-100);
  border: 1px solid var(--card-line);
  border-radius: 10px;
  cursor: pointer;
}
.nav__toggle span{
  width: 16px; height: 2px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav__toggle.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2){ opacity: 0; }
.nav__toggle.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero{
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--yellow-100) 0%, var(--bg) 62%);
}
.hero__canvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .55;
}
.hero__glow{
  position: absolute;
  top: -20%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--yellow-300) 0%, transparent 65%);
  opacity: .5;
  filter: blur(20px);
  pointer-events: none;
}
.hero__content{
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 0 28px;
  text-align: center;
}
.hero__eyebrow{
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--amber-700);
  background: var(--yellow-100);
  border: 1px solid var(--card-line);
  display: inline-block;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 26px;
}
.hero__title{
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: .98;
  color: var(--ink);
}
.hero__tagline{
  margin: 26px auto 0;
  max-width: 560px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  line-height: 1.55;
}
.hero__meta{
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero__meta .dot{ color: var(--yellow-500); }
.hero__actions{
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn{
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
  border: 1px solid transparent;
}
.btn--primary{
  background: var(--ink);
  color: var(--yellow-100);
  box-shadow: 0 3px 0 var(--amber-700);
}
.btn--primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--amber-700);
}
.btn--primary:active{ transform: translateY(1px); box-shadow: 0 1px 0 var(--amber-700); }
.btn--primary svg{ transition: transform .3s var(--ease); }
.btn--primary:hover svg{ transform: translateY(2px); }

.btn--ghost{
  background: transparent;
  border-color: var(--card-line);
  color: var(--ink);
}
.btn--ghost:hover{
  background: var(--yellow-100);
  border-color: var(--yellow-300);
  transform: translateY(-2px);
}

.hero__scroll{
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink-faint);
  z-index: 2;
}
.hero__scroll-dot{ animation: scrollDot 1.8s ease-in-out infinite; }
@keyframes scrollDot{
  0%,100%{ transform: translateY(0); opacity: 1; }
  50%{ transform: translateY(6px); opacity: .3; }
}

/* =========================================================
   SECTIONS — shared
   ========================================================= */
.section{ padding: 120px 0; position: relative; }
.section--alt{ background: var(--bg-alt); }
.section__inner{
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}
.section__head{ margin-bottom: 56px; }
.section__eyebrow{
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber-700);
  letter-spacing: .04em;
  margin-bottom: 14px;
}
.section__title{
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  letter-spacing: -.02em;
  font-weight: 600;
}

/* =========================================================
   ABOUT
   ========================================================= */
.about__grid{
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: start;
}
.about__text{
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.about__text strong{ color: var(--ink); font-weight: 600; }

.about__facts{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.fact{
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.fact:hover{
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -18px rgba(197, 127, 29, .45);
  border-color: var(--yellow-300);
}
.fact__num{
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--amber-700);
}
.fact__label{
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

/* =========================================================
   SKILLS
   ========================================================= */
.skills__grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.skill-card{
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.skill-card:hover{
  transform: translateY(-5px);
  box-shadow: 0 18px 36px -22px rgba(197, 127, 29, .5);
}
.skill-card--highlight{
  background: linear-gradient(160deg, var(--yellow-200), var(--yellow-100));
  border-color: var(--yellow-300);
}
.skill-card h3{
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -.01em;
}
.chips{ display: flex; flex-wrap: wrap; gap: 8px; }
.chip{
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: 100px;
  background: var(--yellow-100);
  border: 1px solid var(--card-line);
  color: var(--ink);
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}
.chip:hover{
  transform: translateY(-2px);
  background: var(--yellow-300);
  border-color: var(--amber-600);
}
.chip--accent{
  background: var(--ink);
  color: var(--yellow-100);
  border-color: var(--ink);
}
.chip--accent:hover{ background: var(--amber-700); border-color: var(--amber-700); }
.chip--mono{ background: var(--bg-alt); }

/* =========================================================
   EXPERIENCE — timeline
   ========================================================= */
.timeline{
  position: relative;
  padding-left: 40px;
  display: flex;
  flex-direction: column;
  gap: 46px;
}
.timeline::before{
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--card-line) 0 6px, transparent 6px 12px);
}
.timeline__item{ position: relative; }
.timeline__dot{
  position: absolute;
  left: -40px;
  top: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--yellow-500);
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 2px var(--amber-600);
}
.timeline__card{
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius-md);
  padding: 30px 32px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.timeline__card:hover{
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -26px rgba(197, 127, 29, .5);
  border-color: var(--yellow-300);
}
.timeline__top{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.timeline__top h3{ font-size: 1.25rem; font-weight: 600; }
.timeline__date{
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--amber-700);
  background: var(--yellow-100);
  padding: 5px 11px;
  border-radius: 100px;
  white-space: nowrap;
}
.timeline__company{
  margin-top: 6px;
  font-weight: 600;
  color: var(--ink);
}
.timeline__company span{ font-weight: 400; color: var(--ink-faint); }
.timeline__card ul{
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.timeline__card li{
  position: relative;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: .96rem;
  line-height: 1.6;
}
.timeline__card li::before{
  content: '';
  position: absolute;
  left: 0; top: .6em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--yellow-500);
}

/* =========================================================
   PROJECTS
   ========================================================= */
.projects__grid{
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 24px;
  align-items: stretch;
}
.project-card{
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.project-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 26px 50px -28px rgba(197, 127, 29, .55);
  border-color: var(--yellow-300);
}
.project-card--feature{
  background: linear-gradient(165deg, var(--yellow-100), var(--card) 55%);
}
.project-card__graphic{
  display: flex;
  justify-content: center;
  padding: 10px 0 0;
}
.node-diagram{ width: 100%; max-width: 320px; height: auto; }
.node-line{
  stroke: var(--amber-600);
  stroke-width: 1.4;
  opacity: .45;
}
.node-dot{
  fill: var(--yellow-500);
  stroke: var(--card);
  stroke-width: 2;
}
.node-dot--main{
  fill: var(--ink);
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot{
  0%,100%{ r: 9; }
  50%{ r: 11; }
}
.project-card__tags{ display: flex; flex-wrap: wrap; gap: 8px; }
.project-card h3{ font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; }
.project-card__note{
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-top: -8px;
}
.project-card ul{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.project-card li{
  position: relative;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.6;
}
.project-card li::before{
  content: '';
  position: absolute;
  left: 0; top: .6em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--yellow-500);
}
.project-card__link{
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: .92rem;
  color: var(--amber-700);
  width: fit-content;
}
.project-card__link svg{ transition: transform .3s var(--ease); }
.project-card__link:hover svg{ transform: translate(2px, -2px); }

/* =========================================================
   EDUCATION
   ========================================================= */
.edu-card{
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius-md);
  padding: 30px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.edu-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -24px rgba(197, 127, 29, .5);
}
.edu-card__main h3{ font-size: 1.2rem; font-weight: 600; }
.edu-card__main p{ margin-top: 4px; color: var(--ink-soft); }
.edu-card__meta{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber-700);
  display: flex;
  align-items: center;
  gap: 10px;
}
.edu-card__meta .dot{ color: var(--yellow-500); }

/* =========================================================
   CONTACT
   ========================================================= */
.section--contact{
  background: var(--ink);
  color: var(--yellow-100);
  overflow: hidden;
  position: relative;
}
.section--contact::before{
  content: '';
  position: absolute;
  top: -30%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(245,197,66,.18), transparent 65%);
  pointer-events: none;
}
.contact__wrap{ text-align: center; max-width: 640px; margin: 0 auto; }
.section--contact .section__eyebrow{ color: var(--yellow-300); }
.contact__title{
  font-size: clamp(1.8rem, 4.4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -.02em;
  margin-top: 10px;
  color: var(--bg);
}
.contact__sub{
  margin-top: 16px;
  color: rgba(255,246,220,.65);
  font-size: 1.05rem;
}
.contact__links{
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.contact__link{
  background: rgba(255,246,220,.06);
  border: 1px solid rgba(255,246,220,.15);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background .3s var(--ease), transform .3s var(--ease), border-color .3s var(--ease);
}
.contact__link:hover{
  background: rgba(245,197,66,.12);
  border-color: var(--yellow-500);
  transform: translateY(-3px);
}
.contact__link-label{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--yellow-500);
  text-transform: uppercase;
}
.contact__link-value{ font-weight: 600; color: var(--bg); font-size: .98rem; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer{
  background: var(--ink);
  color: rgba(255,246,220,.5);
  padding: 26px 0 34px;
}
.footer__inner{
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 8px;
}

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.reveal{
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in-view{ opacity: 1; transform: translateY(0); }
.reveal--1.in-view{ transition-delay: .05s; }
.reveal--2.in-view{ transition-delay: .15s; }
.reveal--3.in-view{ transition-delay: .25s; }
.reveal--4.in-view{ transition-delay: .35s; }

.skills__grid .skill-card:nth-child(1){ transition-delay: 0s; }
.skills__grid .skill-card:nth-child(2){ transition-delay: .06s; }
.skills__grid .skill-card:nth-child(3){ transition-delay: .12s; }
.skills__grid .skill-card:nth-child(4){ transition-delay: .18s; }
.skills__grid .skill-card:nth-child(5){ transition-delay: .24s; }
.skills__grid .skill-card:nth-child(6){ transition-delay: .3s; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px){
  .about__grid{ grid-template-columns: 1fr; gap: 40px; }
  .skills__grid{ grid-template-columns: repeat(2, 1fr); }
  .projects__grid{ grid-template-columns: 1fr; }
  .contact__links{ grid-template-columns: 1fr; }
}

@media (max-width: 720px){
  .nav__links{
    position: fixed;
    top: 68px; left: 16px; right: 16px;
    background: var(--card);
    border: 1px solid var(--card-line);
    border-radius: var(--radius-md);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px;
    box-shadow: 0 20px 40px -20px rgba(0,0,0,.25);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav__links.is-open{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav__links a{
    width: 100%;
    padding: 10px 8px;
    border-radius: 8px;
  }
  .nav__links a:hover{ background: var(--yellow-100); }
  .nav__links a::after{ display: none; }
  .nav__cta{ margin-top: 4px; text-align: center; justify-content: center; display: flex; }
  .nav__toggle{ display: flex; }

  .section{ padding: 84px 0; }
  .skills__grid{ grid-template-columns: 1fr; }
  .fact__num{ font-size: 1.6rem; }
  .timeline{ padding-left: 30px; }
  .timeline__dot{ left: -30px; }
  .timeline__card{ padding: 22px 20px; }
  .edu-card{ flex-direction: column; align-items: flex-start; }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce){
  *{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal{ opacity: 1; transform: none; }
}
