/* =========================================================
   Krushnakanta Mohakud — Portfolio
   Design tokens
   ========================================================= */
:root {
  /* Color */
  --bg: #12151A;
  --bg-elevated: #191D24;
  --bg-elevated-2: #1F242C;
  --border: #2A2F38;
  --border-soft: #232830;
  --text: #EDEBE6;
  --text-muted: #9AA1AC;
  --text-faint: #6B7280;
  --accent: #D6A756;
  --accent-soft: rgba(214, 167, 86, 0.12);
  --accent-border: rgba(214, 167, 86, 0.35);
  --focus-ring: #E8C179;

  /* Type */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  /* Layout */
  --max-width: 920px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-space: clamp(4rem, 10vw, 7rem);
  --radius: 6px;
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
}

p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--font-mono); font-size: 0.9em; color: var(--accent); }

img { max-width: 100%; display: block; }

/* =========================================================
   Accessibility helpers
   ========================================================= */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: #16130A;
  padding: 0.75em 1.25em;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

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

/* =========================================================
   Layout helpers
   ========================================================= */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75em;
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--section-space) var(--gutter) 0;
  scroll-margin-top: 5rem;
}
#contact.section { padding-bottom: var(--section-space); }

.section--split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

@media (max-width: 720px) {
  .section--split { grid-template-columns: 1fr; }
}

.subheading {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-top: 2em;
}

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 21, 26, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__mark {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.nav__mark-dot { color: var(--accent); }

.nav__list {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
}

.nav__list a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.4em 0.1em;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav__list a:hover,
.nav__list a:focus-visible {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.nav__list a.is-active {
  color: var(--accent);
}

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 40px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav__toggle-bar,
.nav__toggle-bar::before,
.nav__toggle-bar::after {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav__toggle-bar::before { position: absolute; top: -6px; }
.nav__toggle-bar::after { position: absolute; top: 6px; }

@media (max-width: 640px) {
  .nav__toggle { display: flex; }
  .nav__list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-soft);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav__list.is-open { max-height: 320px; }
  .nav__list li { border-top: 1px solid var(--border-soft); }
  .nav__list a { display: block; padding: 1em var(--gutter); }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(4rem, 14vw, 8rem) var(--gutter) var(--section-space);
}

.hero__name {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.4em;
}

.cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.85em;
  margin-left: 0.08em;
  background: var(--accent);
  vertical-align: -0.1em;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; opacity: 1; }
}

.hero__lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 2em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0.8em 1.4em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn--primary {
  background: var(--accent);
  color: #16130A;
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: #E4B76B;
}
.btn--ghost {
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 2rem 3rem;
  border-top: 1px solid var(--border-soft);
  padding-top: 1.75rem;
}
@media (max-width: 560px) {
  .hero__facts { grid-template-columns: 1fr; gap: 1rem; }
}
.hero__fact dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 0.4em;
}
.hero__fact dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

/* =========================================================
   About
   ========================================================= */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 2rem 3rem;
  align-items: start;
}
@media (max-width: 780px) {
  .about__grid { grid-template-columns: 1fr; }
}
.about__text { color: var(--text-muted); max-width: 46ch; }
.about__list {
  display: flex;
  flex-direction: column;
  gap: 0.9em;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  border-left: 1px solid var(--accent-border);
  padding-left: 1.25rem;
}

/* =========================================================
   Skills
   ========================================================= */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem 2.5rem;
  margin-top: 2rem;
}
.skill-group h3 {
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 0.9em;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag-list li {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.4em 0.75em;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

/* =========================================================
   Timeline (Experience)
   ========================================================= */
.timeline {
  margin-top: 2.5rem;
  position: relative;
}
.timeline__item {
  position: relative;
  padding-left: 2.25rem;
  border-left: 1px solid var(--border);
  padding-bottom: 3.5rem;
}
.timeline__item:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.timeline__node {
  position: absolute;
  left: -5px;
  top: 0.35rem;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 2px;
  transform: rotate(45deg);
}
.timeline__date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.03em;
  margin-bottom: 0.6em;
}
.timeline__role {
  font-size: 1.3rem;
  margin-bottom: 0.2em;
}
.timeline__org {
  color: var(--text-muted);
  margin-bottom: 0.2em;
}
.timeline__note {
  font-size: 0.85rem;
  color: var(--text-faint);
  font-style: italic;
}
.timeline__project {
  margin-top: 1.75rem;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.timeline__project h4 {
  font-size: 1rem;
  margin-bottom: 0.4em;
}
.timeline__stack {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 1em;
}
.timeline__project ul,
.timeline__item > ul {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}
.timeline__project li,
.timeline__item > ul li {
  position: relative;
  padding-left: 1.1em;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.timeline__project li::before,
.timeline__item > ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

/* =========================================================
   Projects
   ========================================================= */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.project-card {
  padding: 1.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}
.project-card:hover {
  border-color: var(--accent-border);
}
.project-card h3 { font-size: 1.1rem; }
.project-card__stack {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 1em;
}
.project-card p:last-child {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* =========================================================
   Education / Achievements
   ========================================================= */
.edu-block { margin-bottom: 2rem; }
.plain-list {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.plain-list li {
  padding-left: 1.1em;
  position: relative;
}
.plain-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.achievement-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}
.achievement-list li {
  border-left: 1px solid var(--border);
  padding-left: 1.25rem;
}
.achievement-list p:last-child {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* =========================================================
   Contact
   ========================================================= */
.section--contact {
  border-top: 1px solid var(--border-soft);
  margin-top: var(--section-space);
}
.contact__lede {
  color: var(--text-muted);
  max-width: 50ch;
  margin-bottom: 2rem;
}
.contact__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.contact__list li {
  padding: 1.25rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.contact__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 0.5em;
}
.contact__list a {
  word-break: break-word;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.contact__list a:hover,
.contact__list a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 3.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  color: var(--text-faint);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-soft);
}
.back-to-top {
  font-family: var(--font-mono);
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.back-to-top:hover,
.back-to-top:focus-visible { color: var(--accent); }

/* =========================================================
   Reveal-on-scroll (progressive enhancement)
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
