/*
  Styles for Avinandan Roy Portfolio
  - Modern responsive design
  - Light/Dark themes with accent color
  - Smooth animations and interactions
*/

/* CSS Reset (simplified) */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[role='list'], ol[role='list'] { list-style: none; }
img, picture { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; }

:root {
  --accent: #7c5cff;
  --accent-2: #00d4ff;
  --bg: #0b0d12;
  --bg-elev: #121520;
  --text: #e7eaf1;
  --muted: #a6b0c3;
  --card: #121521;
  --border: #262a39;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

[data-theme="light"]:root, html[data-theme="light"] {
  --bg: #f7f8fb;
  --bg-elev: #ffffff;
  --text: #0f1222;
  --muted: #4c5676;
  --card: #ffffff;
  --border: #e5e8f0;
  --shadow: 0 10px 30px rgba(25,25,50,0.12);
}

html { scroll-behavior: smooth; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(124,92,255,0.15), transparent 60%),
              radial-gradient(1000px 500px at 110% 10%, rgba(0,212,255,0.12), transparent 60%),
              var(--bg);
  line-height: 1.6;
}

.container { width: min(1100px, 92%); margin: 0 auto; }

/* Navbar */
.navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  background: color-mix(in oklab, var(--bg-elev) 72%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; letter-spacing: 0.5px; color: var(--text); text-decoration: none; font-family: "JetBrains Mono", monospace; }
.nav-links { display: none; gap: 24px; }
.nav-link { color: var(--muted); text-decoration: none; transition: color .2s ease; }
.nav-link:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.menu-bars, .theme-icon { width: 18px; height: 18px; display: inline-block; position: relative; }
.menu-bars::before, .menu-bars::after, .menu-bars { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--text); border-radius: 2px; }
.menu-bars { top: 8px; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }
.theme-icon { border: 2px solid var(--text); border-radius: 50%; box-sizing: border-box; }

.mobile-nav { display: none; flex-direction: column; gap: 14px; padding: 12px 4%; background: var(--bg-elev); border-bottom: 1px solid var(--border); }
.mobile-nav .nav-link { padding: 10px 8px; }
.mobile-nav.open { display: flex; }

/* Sections */
.section { padding: 96px 0; }
.hero { padding-top: 140px; }
.section-title { font-size: 28px; font-weight: 800; margin-bottom: 28px; }

/* Hero */
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--muted); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.title { font-size: clamp(34px, 6vw, 56px); line-height: 1.1; margin: 8px 0 8px; }
.subtitle { min-height: 32px; color: var(--muted); font-size: clamp(16px, 2.5vw, 20px); }
.typing { font-weight: 700; color: var(--text); border-right: 2px solid var(--accent); padding-right: 6px; }
.hero-cta { display: flex; gap: 12px; margin-top: 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 12px 16px; border: 1px solid var(--border); text-decoration: none; color: var(--text); background: var(--bg-elev); transition: transform .12s ease, box-shadow .2s ease, background .2s ease; box-shadow: var(--shadow); }
.button:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(0,0,0,.25); }
.button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none; color: white; }
.button.secondary { background: transparent; }
.button.small { padding: 8px 12px; border-radius: 10px; }

.socials { display: flex; gap: 12px; margin-top: 22px; }
.social-link { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elev); transition: transform .12s ease, background .2s ease; }
.social-link:hover { transform: translateY(-2px); background: color-mix(in oklab, var(--bg-elev) 70%, var(--accent) 30%); }

.hero-visual { position: relative; height: 320px; }
.blob {
  position: absolute; inset: 0; filter: blur(40px); border-radius: 24px; opacity: .9;
  background: conic-gradient(from 180deg at 50% 50%, rgba(124,92,255,.65), rgba(0,212,255,.65), rgba(124,92,255,.65));
  animation: rotate 12s linear infinite;
}
@keyframes rotate { to { transform: rotate(1turn); } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.card { grid-column: span 12; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.35); border-color: color-mix(in oklab, var(--border) 70%, var(--accent) 30%); }
.card-content h3 { font-size: 20px; margin-bottom: 8px; }
.card-content p { color: var(--muted); }
.card-actions { display: flex; gap: 10px; margin-top: 14px; }

/* Timeline */
.timeline { position: relative; margin-left: 8px; }
.timeline::before { content: ""; position: absolute; left: 12px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--accent), var(--accent-2)); opacity: .6; }
.timeline-item { position: relative; padding-left: 44px; margin-bottom: 24px; }
.timeline-dot { position: absolute; left: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 15%, transparent); }
.timeline-content h3 { font-size: 18px; margin-bottom: 6px; }
.timeline-content time { display: inline-block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.timeline-content p { color: var(--muted); }

/* Contact */
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.field { grid-column: span 12; display: grid; gap: 8px; }
.field.full { grid-column: span 12; }
input, textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); outline: none; transition: border-color .15s ease, box-shadow .2s ease; }
input:focus, textarea:focus { border-color: color-mix(in oklab, var(--border) 50%, var(--accent) 50%); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent); }
.error { color: #ff6b6b; min-height: 16px; font-size: 12px; }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
#formStatus { font-size: 14px; color: var(--muted); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 28px 0; background: color-mix(in oklab, var(--bg-elev) 80%, transparent); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (min-width: 720px) {
  .nav-links { display: flex; }
  #menuToggle { display: none; }
  .cards .card { grid-column: span 6; }
  .field { grid-column: span 6; }
  .field.full { grid-column: span 12; }
}
@media (min-width: 980px) {
  .cards .card { grid-column: span 3; }
}
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; height: 240px; }
}


