/* ═══════════════════════════════════════════════
   AASHUTOSH DAHAL — Portfolio Styles
   ═══════════════════════════════════════════════ */

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

:root {
  --bg:    #040d08;
  --bg2:   #06120c;
  --bg3:   #0a1a12;
  --emerald:       #10b981;
  --emerald-light: #34d399;
  --emerald-dim:   #065f46;
  --gold:   #c9a84c;
  --text:   #e8f5ef;
  --text-muted: #7aaa90;
  --text-dim:   #3d7060;
  --border: rgba(16,185,129,0.14);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
}

/* ── Custom Cursor ── */
.cursor {
  position: fixed; width: 7px; height: 7px;
  background: var(--emerald); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
}
.cursor-ring {
  position: fixed; width: 30px; height: 30px;
  border: 1px solid rgba(16,185,129,.45); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: width .2s, height .2s;
}

/* ── Nav ── */
nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 5rem;
  transition: background .4s, backdrop-filter .4s;
}
nav.scrolled {
  background: rgba(4,13,8,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem; font-weight: 600;
  color: var(--emerald-light); text-decoration: none; letter-spacing: .06em;
}
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-family: 'DM Mono', monospace; font-size: .72rem;
  color: var(--text-muted); text-decoration: none;
  letter-spacing: .12em; text-transform: uppercase;
  transition: color .2s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--emerald); transition: width .3s;
}
.nav-links a:hover { color: var(--emerald-light); }
.nav-links a:hover::after { width: 100%; }

/* ── Hero ── */
#hero {
  position: relative; height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; padding: 0 5rem; gap: 2rem; overflow: hidden;
}
#threeCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  /* Canvas is now interactive — pointer events ON */
  pointer-events: auto;
  cursor: grab;
}
#threeCanvas:active { cursor: grabbing; }

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

.hero-label {
  font-family: 'DM Mono', monospace; font-size: .72rem;
  color: var(--emerald); letter-spacing: .22em; text-transform: uppercase;
  margin-bottom: 1.4rem; opacity: 0; animation: fadeUp .8s .3s ease forwards;
}
.hero-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3.2rem, 7vw, 6.5rem); font-weight: 300;
  line-height: 1; letter-spacing: -.02em; margin-bottom: .6rem;
  opacity: 0; animation: fadeUp .8s .5s ease forwards;
}
.hero-name span { color: var(--emerald-light); font-style: italic; }

.hero-subtitle {
  font-family: 'DM Mono', monospace;
  font-size: clamp(.78rem, 1.4vw, .95rem); font-weight: 300;
  color: var(--text-muted); margin-bottom: 3rem; min-height: 1.8em;
  opacity: 0; animation: fadeUp .8s .7s ease forwards;
}
.tw-cursor {
  display: inline-block; width: 2px; height: 1em;
  background: var(--emerald); margin-left: 2px;
  vertical-align: text-bottom; animation: blink 1s step-end infinite;
}
.hero-cta {
  display: flex; gap: 1.8rem; align-items: center;
  opacity: 0; animation: fadeUp .8s .9s ease forwards;
}
.btn-primary {
  font-family: 'DM Mono', monospace; font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--bg); background: var(--emerald);
  padding: .85rem 2.1rem; text-decoration: none;
  border: 1px solid var(--emerald); position: relative; overflow: hidden;
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: var(--emerald-light);
  transform: translateX(-100%); transition: transform .3s;
}
.btn-primary:hover::before { transform: translateX(0); }
.btn-primary span { position: relative; z-index: 1; }

.btn-ghost {
  font-family: 'DM Mono', monospace; font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--emerald-light); text-decoration: none;
  border-bottom: 1px solid var(--emerald-dim); padding-bottom: 2px;
  transition: color .3s, border-color .3s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text); }

/* Hero interaction hint */
.devops-hint {
  position: absolute; bottom: 6rem; right: 5rem; z-index: 2;
  font-family: 'DM Mono', monospace; font-size: .62rem;
  letter-spacing: .18em; color: var(--emerald); text-transform: uppercase;
  opacity: 0; animation: fadeIn 1.2s 1.8s ease forwards;
  display: flex; align-items: center; gap: .6rem;
  pointer-events: none;
}
.devops-hint::before { content: ''; width: 24px; height: 1px; background: var(--emerald); }

.scroll-hint {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  z-index: 2; opacity: 0; animation: fadeIn 1s 1.6s ease forwards;
  pointer-events: none;
}
.scroll-hint span {
  font-family: 'DM Mono', monospace; font-size: .62rem;
  letter-spacing: .2em; color: var(--text-dim); text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--emerald), transparent);
  animation: pulse 2s ease infinite;
}

/* ── Sections ── */
section { padding: 8rem 5rem; }
.s-label {
  font-family: 'DM Mono', monospace; font-size: .68rem;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--emerald); margin-bottom: 1rem;
}
.s-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3.6rem); font-weight: 300;
  line-height: 1.1; margin-bottom: 4rem;
}

/* ── About ── */
#about { background: var(--bg2); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1.1fr;
  gap: 6rem; align-items: center;
}

/* Photo avatar — replaces the 3D canvas */
.avatar-wrap {
  position: relative; display: flex;
  flex-direction: column; align-items: center; gap: 1.2rem;
}
.avatar-photo-container {
  position: relative;
  width: 100%; max-width: 380px;
}
.avatar-photo {
  width: 100%; max-width: 380px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--border);
  display: block;
  box-shadow: 0 0 60px rgba(16,185,129,0.15), 0 25px 60px rgba(0,0,0,0.55);
  border-radius: 50%;
  transition: box-shadow .4s;
}
.avatar-photo:hover {
  box-shadow: 0 0 80px rgba(16,185,129,0.28), 0 25px 80px rgba(0,0,0,0.65);
}
/* Emerald glow ring */
.avatar-photo-container::before {
  content: '';
  position: absolute; inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(16,185,129,0.35);
  animation: ringPulse 3s ease-in-out infinite;
}
.avatar-photo-container::after {
  content: '';
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(16,185,129,0.12);
  animation: ringPulse 3s ease-in-out infinite .8s;
}
@keyframes ringPulse {
  0%,100% { opacity:.4; transform:scale(1); }
  50%      { opacity:.9; transform:scale(1.012); }
}

.avatar-hint {
  font-family: 'DM Mono', monospace; font-size: .6rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--text-dim);
  display: flex; align-items: center; gap: .5rem;
}
.avatar-hint::before, .avatar-hint::after {
  content: ''; width: 18px; height: 1px; background: var(--text-dim);
}
.avatar-label {
  font-family: 'DM Mono', monospace; font-size: .63rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--emerald-light); background: rgba(4,13,8,0.9);
  border: 1px solid var(--emerald-dim); padding: .45rem 1.1rem;
  backdrop-filter: blur(8px); box-shadow: 0 0 20px rgba(16,185,129,0.2);
}

.about-copy p {
  font-size: 1rem; line-height: 1.9;
  color: var(--text-muted); margin-bottom: 1.5rem;
}
.about-copy p strong { color: var(--text); font-weight: 400; }
.about-stats {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1.5rem; margin-top: 2.5rem; padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem; font-weight: 300;
  color: var(--emerald-light); line-height: 1;
}
.stat-lbl {
  font-family: 'DM Mono', monospace; font-size: .63rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); margin-top: .45rem;
}

/* ── Skills ── */
#skills { background: var(--bg); }
.skill-groups { display: flex; flex-direction: column; gap: 2.8rem; }
.sg-label {
  font-family: 'DM Mono', monospace; font-size: .63rem;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .9rem;
}
.sg-tags { display: flex; flex-wrap: wrap; gap: .7rem; }
.tag {
  font-family: 'DM Mono', monospace; font-size: .73rem;
  color: var(--text-muted); border: 1px solid var(--border);
  padding: .48rem .95rem; cursor: default;
  transition: color .25s, border-color .25s;
  position: relative; overflow: hidden;
}
.tag::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(16,185,129,.07);
  transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.tag:hover { color: var(--emerald-light); border-color: var(--emerald-dim); }
.tag:hover::before { transform: scaleX(1); }

/* ── Experience ── */
#experience { background: var(--bg2); }
.exp-card {
  border: 1px solid var(--border); padding: 3rem;
  position: relative; overflow: hidden;
}
.exp-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--emerald);
}
.exp-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem;
}
.exp-role {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem; font-weight: 300; color: var(--text); line-height: 1.15;
}
.exp-company { font-size: .9rem; color: var(--gold); font-weight: 400; letter-spacing: .05em; margin-top: .25rem; }
.exp-date {
  font-family: 'DM Mono', monospace; font-size: .7rem; letter-spacing: .1em;
  color: var(--emerald); background: rgba(16,185,129,.08);
  border: 1px solid var(--border); padding: .4rem .9rem;
  white-space: nowrap; align-self: flex-start;
}
.exp-divider { width: 100%; height: 1px; background: var(--border); margin-bottom: 2rem; }
.exp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.exp-bullet {
  display: flex; gap: .75rem; font-size: .9rem;
  color: var(--text-muted); line-height: 1.75;
  padding: 1rem 1.2rem; border: 1px solid rgba(16,185,129,.08);
  transition: border-color .3s, background .3s;
}
.exp-bullet:hover { border-color: var(--border); background: rgba(16,185,129,.03); }
.exp-bullet::before {
  content: '→'; color: var(--emerald); flex-shrink: 0;
  font-family: 'DM Mono', monospace; font-size: .8rem; margin-top: .1em;
}

/* ── Contact ── */
#contact { background: var(--bg); text-align: center; padding: 11rem 5rem; }
.contact-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.6rem, 6.5vw, 5.5rem); font-weight: 300;
  line-height: 1.1; margin-bottom: 2rem;
}
.contact-headline em { color: var(--emerald-light); font-style: italic; }
.contact-sub { font-size: .98rem; color: var(--text-muted); max-width: 480px; margin: 0 auto 2.5rem; line-height: 1.85; }
.contact-email {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.7rem); font-weight: 300;
  color: var(--emerald); text-decoration: none;
  border-bottom: 1px solid var(--emerald-dim); padding-bottom: 4px;
  display: inline-block; margin-bottom: 3.5rem;
  transition: color .3s, border-color .3s;
}
.contact-email:hover { color: var(--emerald-light); border-color: var(--emerald-light); }
.contact-btns { display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }
.c-btn {
  font-family: 'DM Mono', monospace; font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); text-decoration: none;
  border: 1px solid var(--border); padding: .9rem 1.9rem;
  transition: color .3s, border-color .3s, background .3s;
}
.c-btn:hover { color: var(--emerald-light); border-color: var(--emerald); background: rgba(16,185,129,.05); }

/* ── Footer ── */
footer {
  padding: 1.8rem 5rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
footer span { font-family: 'DM Mono', monospace; font-size: .63rem; letter-spacing: .1em; color: var(--text-dim); }

/* ── Animations ── */
@keyframes fadeUp  { from { opacity:0; transform:translateY(22px) } to { opacity:1; transform:translateY(0) } }
@keyframes fadeIn  { from { opacity:0 } to { opacity:1 } }
@keyframes blink   { 0%,100%{opacity:1} 50%{opacity:0} }
@keyframes pulse   { 0%,100%{opacity:.3} 50%{opacity:1} }

/* ── Scroll Reveal ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .85s ease, transform .85s ease; }
.reveal.visible { opacity: 1; transform: none; }
.d1 { transition-delay: .12s }
.d2 { transition-delay: .24s }
.d3 { transition-delay: .36s }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--emerald-dim); border-radius: 2px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  nav { padding: 1.2rem 2rem; }
  section { padding: 6rem 2rem; }
  #hero { grid-template-columns: 1fr; padding: 0 2rem; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .exp-grid { grid-template-columns: 1fr; }
  footer, #contact { padding-left: 2rem; padding-right: 2rem; }
  .devops-hint { right: 2rem; bottom: 5rem; }
}
