/* =============================================
   HARINI V — PORTFOLIO CSS
   ============================================= */

/* === CSS VARIABLES === */
:root {
  --accent: #00f0c8;
  --accent2: #7b5ea7;
  --accent-glow: rgba(0,240,200,0.25);
  --bg: #0a0a10;
  --bg2: #111118;
  --bg3: #16161f;
  --glass: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.08);
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --text-strong: #ffffff;
  --card-bg: rgba(22,22,31,0.85);
  --nav-bg: rgba(10,10,16,0.85);
  --shadow: 0 20px 60px rgba(0,0,0,0.5);
  --radius: 16px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="light"] {
  --bg: #f4f4fa;
  --bg2: #eaeaf4;
  --bg3: #ffffff;
  --glass: rgba(255,255,255,0.7);
  --glass-border: rgba(0,0,0,0.08);
  --text: #1a1a2e;
  --text-muted: #555570;
  --text-strong: #0a0a10;
  --card-bg: rgba(255,255,255,0.9);
  --nav-bg: rgba(244,244,250,0.85);
  --shadow: 0 20px 60px rgba(0,0,0,0.12);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
ul { list-style: none; }

/* === PRELOADER === */
#preloader {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { position: relative; display: flex; align-items: center; justify-content: center; }
.loader-ring {
  width: 72px; height: 72px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.loader-text {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--accent);
}

/* === CUSTOM CURSOR === */
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, width 0.25s ease, height 0.25s ease, opacity 0.25s ease;
  opacity: 0.6;
}
.cursor-ring.hovered { width: 52px; height: 52px; opacity: 0.3; }

/* === SCROLL PROGRESS BAR === */
#scrollProgress {
  position: fixed; top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  z-index: 10000;
  width: 0%;
  transition: width 0.1s linear;
}

/* === NAVBAR === */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}
.nav-container {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--text-strong);
  letter-spacing: -1px;
}
.logo span { color: var(--accent); }
.nav-links {
  display: flex; gap: 6px; align-items: center;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent);
  background: var(--accent-glow);
}
.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: none;
  padding: 6px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  cursor: none;
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #00b89a);
  color: #0a0a10;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 32px var(--accent-glow); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--glass-border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }

/* Ripple */
.ripple { overflow: hidden; }
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
}
@keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }

/* === SECTIONS === */
section { padding: 100px 0; position: relative; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 32px; }

.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1.1;
}

/* === REVEAL ANIMATIONS === */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-hero { opacity: 0; animation: heroEntrance 1s ease 0.6s forwards; }
@keyframes heroEntrance { to { opacity: 1; transform: translateY(0); } }

/* === HOME === */
#home {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 68px;
}

.hero-bg {
  position: absolute; inset: 0;
  background: var(--bg);
  overflow: hidden;
}
.hero-bg::before {
  content: '';
  position: absolute;
  top: -30%; left: -20%;
  width: 80%; height: 80%;
  background: radial-gradient(ellipse, rgba(0,240,200,0.12) 0%, transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -20%; right: -10%;
  width: 60%; height: 60%;
  background: radial-gradient(ellipse, rgba(123,94,167,0.15) 0%, transparent 70%);
  animation: pulse 10s ease-in-out infinite reverse;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.15); opacity: 1; } }

.shape {
  position: absolute;
  border-radius: 50%;
  animation: floatShape linear infinite;
}
.shape-1 { width: 80px; height: 80px; top: 15%; left: 8%; border: 1px solid rgba(0,240,200,0.2); animation-duration: 12s; animation-delay: 0s; }
.shape-2 { width: 50px; height: 50px; top: 70%; right: 10%; border: 1px solid rgba(123,94,167,0.25); animation-duration: 9s; animation-delay: -3s; }
.shape-3 { width: 120px; height: 120px; bottom: 15%; left: 15%; border: 1px solid rgba(0,240,200,0.1); animation-duration: 15s; animation-delay: -6s; }
.shape-4 { width: 35px; height: 35px; top: 30%; right: 20%; background: rgba(123,94,167,0.15); animation-duration: 8s; animation-delay: -2s; }
@keyframes floatShape { 0%,100% { transform: translateY(0) rotate(0deg); } 33% { transform: translateY(-20px) rotate(120deg); } 66% { transform: translateY(10px) rotate(240deg); } }

.hero-content { position: relative; z-index: 2; }
.hero-greeting { font-size: 16px; color: var(--accent); font-weight: 500; letter-spacing: 2px; margin-bottom: 12px; }
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(52px, 10vw, 96px);
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1;
  letter-spacing: -3px;
  margin-bottom: 18px;
}
.hero-role {
  font-size: clamp(18px, 3vw, 26px);
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 300;
}
.role-prefix { color: var(--text-muted); }
.typed-text { color: var(--accent); font-weight: 500; }
.cursor-blink {
  color: var(--accent);
  animation: blink 0.8s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.hero-sub { color: var(--text-muted); font-size: 16px; margin-bottom: 40px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.scroll-down-arrow {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 18px;
  animation: bounce 2s ease-in-out infinite;
  z-index: 2;
}
@keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* === ABOUT === */
#about { background: var(--bg2); }
.about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: center; }
.about-card-img {
  aspect-ratio: 1;
  max-width: 340px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  backdrop-filter: blur(12px);
}
.avatar-placeholder {
  width: 100px; height: 100px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  color: #0a0a10;
}
.about-badge {
  position: absolute;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  backdrop-filter: blur(12px);
}
.badge-1 { top: 12%; right: -18%; }
.badge-2 { bottom: 20%; right: -22%; }
.badge-3 { bottom: 8%; left: -12%; }

.about-text h3 {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 20px;
  line-height: 1.3;
}
.about-text h3 span { color: var(--accent); }
.about-text p { color: var(--text-muted); margin-bottom: 16px; font-size: 16px; }
.about-stats {
  display: flex; gap: 32px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--glass-border);
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* === SKILLS === */
#skills { background: var(--bg); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 56px;
}
.skill-category {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}
.skill-category:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-4px);
}
.skill-cat-header {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-strong);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.skill-cat-header i { color: var(--accent); font-size: 16px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  background: var(--bg3);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-size: 12px; font-weight: 500;
  padding: 6px 14px;
  border-radius: 50px;
  transition: var(--transition);
}
.skill-tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

.skill-bars { max-width: 700px; margin: 0 auto; }
.bar-item { margin-bottom: 24px; }
.bar-label {
  display: flex; justify-content: space-between;
  font-size: 14px; font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}
.bar-track {
  height: 6px;
  background: var(--glass);
  border-radius: 50px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 50px;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === PROJECTS === */
#projects { background: var(--bg2); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 36px 32px 32px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.35), 0 0 40px var(--accent-glow);
  border-color: rgba(0,240,200,0.3);
}
.project-glow {
  position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 60% 40%, var(--accent-glow), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.project-card:hover .project-glow { opacity: 1; }
.project-num {
  font-family: var(--font-display);
  font-size: 56px; font-weight: 800;
  color: var(--glass-border);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -2px;
}
.project-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 14px;
}
.project-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.project-tech {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.project-tech span {
  background: var(--accent-glow);
  border: 1px solid rgba(0,240,200,0.2);
  color: var(--accent);
  font-size: 11px; font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  letter-spacing: 0.5px;
}
.btn-project {
  background: transparent;
  border: 1.5px solid var(--glass-border);
  color: var(--text);
  padding: 10px 22px;
  font-size: 13px;
  border-radius: 50px;
}
.btn-project:hover { border-color: var(--accent); color: var(--accent); }

/* === RESUME === */
#resume { background: var(--bg); }
.resume-wrapper { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 36px; }

/* Image preview */
.resume-img-wrap {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.resume-preview-img {
  width: 100%;
  display: block;
  border-radius: 20px;
  transition: transform 0.45s ease, filter 0.45s ease;
}
.resume-img-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.35s ease;
  border-radius: 20px;
  color: #fff;
}
.resume-img-overlay i { font-size: 32px; color: var(--accent); }
.resume-img-overlay span { font-size: 14px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.resume-img-wrap:hover .resume-preview-img { transform: scale(1.03); filter: brightness(0.7); }
.resume-img-wrap:hover .resume-img-overlay { opacity: 1; }

/* Buttons row */
.resume-actions {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}


/* === CONTACT === */
#contact { background: var(--bg2); }
.contact-wrapper { max-width: 640px; margin: 0 auto; text-align: center; }
.contact-intro {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 48px;
  line-height: 1.7;
}
.contact-info { display: flex; flex-direction: column; gap: 20px; margin-bottom: 40px; }
.contact-item {
  display: flex; align-items: center; gap: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 20px 28px;
  text-align: left;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}
.contact-item:hover { border-color: var(--accent); transform: translateX(6px); }
.contact-icon {
  width: 48px; height: 48px;
  background: var(--accent-glow);
  border: 1px solid rgba(0,240,200,0.2);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-label { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.contact-value { font-size: 15px; font-weight: 500; color: var(--text); transition: color 0.2s; }
.contact-value:hover { color: var(--accent); }

/* === FOOTER === */
footer {
  background: var(--bg);
  border-top: 1px solid var(--glass-border);
  padding: 48px 32px;
  text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer-logo {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 800;
  color: var(--text-strong);
  margin-bottom: 8px;
}
.footer-logo span { color: var(--accent); }
footer p { font-size: 14px; color: var(--text-muted); }
.footer-copy { font-size: 12px; margin-top: 4px; }

/* === BACK TO TOP === */
#backToTop {
  position: fixed; bottom: 32px; right: 32px;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0a0a10;
  border: none; border-radius: 50%;
  font-size: 16px;
  cursor: none;
  opacity: 0; transform: translateY(20px);
  transition: var(--transition);
  z-index: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px var(--accent-glow);
}
#backToTop.show { opacity: 1; transform: translateY(0); }
#backToTop:hover { transform: translateY(-4px) scale(1.05); }

/* === TOAST === */
#toast {
  position: fixed; bottom: 96px; right: 32px;
  background: var(--card-bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 14px; font-weight: 500;
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 9000;
  backdrop-filter: blur(12px);
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translateY(0); }

/* === KEYFRAMES === */
@keyframes spin { to { transform: rotate(360deg); } }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-card-img { max-width: 260px; margin: 0 auto; }
  .badge-1 { top: 5%; right: -5%; }
  .badge-2 { bottom: 10%; right: -5%; }
  .badge-3 { bottom: -8%; left: 5%; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: 68px; right: 0; bottom: 0; left: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: center; justify-content: center;
    gap: 8px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    z-index: 999;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-link { font-size: 22px; padding: 14px 28px; }
  .hamburger { display: flex; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-stats { gap: 20px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
  .btn, a, button { cursor: pointer; }
  .badge-1, .badge-2, .badge-3 { font-size: 10px; padding: 6px 10px; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  #navbar { padding: 0 20px; }
  section { padding: 80px 0; }
  .section-title { font-size: 28px; }
  .hero-name { letter-spacing: -2px; }
  .about-badge { display: none; }
}
