/* =====================================================
   PERIYASAMY K — DevOps Portfolio CSS
   Theme: Dark terminal / industrial DevOps
   Fonts: JetBrains Mono (code) + Inter (body) + Poppins (headings)
   ===================================================== */

/* ── CSS Variables ─────────────────────────────── */
:root {
  --bg:          #0a0c10;
  --bg-card:     #0f1218;
  --bg-card2:    #131820;
  --border:      #1e2530;
  --border-glow: #00e5ff44;
  --cyan:        #00e5ff;
  --cyan-dim:    #00b8cc;
  --green:       #00ff88;
  --yellow:      #ffd600;
  --red:         #ff4d6d;
  --text:        #d0dce8;
  --text-dim:    #6b7e95;
  --text-muted:  #3d4f62;
  --white:       #f0f6ff;

  /* CHANGE 2: Updated fonts — Poppins (headings), Inter (body), JetBrains Mono (code) */
  --font-mono:   'JetBrains Mono', monospace;  /* CHANGE 2: JetBrains Mono for code/terminal elements */
  --font-sans:   'Inter', sans-serif;
  --font-heading:'Poppins', sans-serif;

  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 4px 30px rgba(0,0,0,0.5);
  --glow:        0 0 20px rgba(0,229,255,0.15);
}

/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;         /* Inter reads better at 1.75 */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;  /* sharper Inter rendering */
  letter-spacing: -0.01em;  /* Inter looks tighter and more pro */
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── Container ──────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Sections ───────────────────────────────────── */
.section {
  padding: 100px 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-heading);  /* CHANGE 2: Poppins for section headings */
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  letter-spacing: -0.02em;  /* Poppins looks tighter at large sizes */
}

.section-title::after {
  content: '';
  display: block;
  height: 3px;
  width: 60px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  margin-top: 0.4rem;
}

/* ═══════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  background: transparent;
  transition: background 0.3s, padding 0.3s, border-bottom 0.3s;
}

.navbar.scrolled {
  background: rgba(10,12,16,0.95);
  backdrop-filter: blur(12px);
  padding: 0.8rem 3rem;
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--cyan);
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--cyan);
  transition: width 0.25s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cyan);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* ═══════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 0 2rem;
}

/* Grid background */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

/* Glowing orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.orb-1 {
  width: 500px; height: 500px;
  background: rgba(0,229,255,0.08);
  top: -100px; right: -100px;
}
.orb-2 {
  width: 350px; height: 350px;
  background: rgba(0,255,136,0.05);
  bottom: -80px; left: -80px;
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 120px 0 80px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(0,229,255,0.1);
  border: 1px solid rgba(0,229,255,0.3);
  color: var(--cyan);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.08em;
  animation: fadeInDown 0.8s ease both;
}

.hero-name {
  font-family: var(--font-heading);  /* CHANGE 2: Poppins for hero name */
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;  /* tight tracking for large Poppins */
  animation: fadeInUp 0.9s ease 0.1s both;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  color: var(--cyan);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.9s ease 0.2s both;
}

.typed-prefix {
  color: var(--green);
  margin-right: 0.3rem;
}

.hero-summary {
  max-width: 680px;
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.9s ease 0.3s both;
}

/* CTA Buttons */
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeInUp 0.9s ease 0.4s both;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-primary {
  background: var(--cyan);
  color: var(--bg);
  font-weight: 700;
  border: 2px solid var(--cyan);
}
.btn-primary:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,229,255,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--cyan);
  border: 2px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--cyan);
  background: rgba(0,229,255,0.07);
  transform: translateY(-2px);
}

/* Stats bar */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.9s ease 0.5s both;
}

.stat { text-align: center; }

.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-divider {
  color: var(--border);
  font-size: 1.5rem;
}

/* ═══════════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════════ */
.about-section { background: var(--bg); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--text-dim);
  margin-bottom: 1.2rem;
  font-size: 1.02rem;
}

.about-text strong { color: var(--white); }

.about-meta {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.92rem;
  color: var(--text-dim);
}

.meta-icon { font-size: 1.1rem; }

/* Terminal Card */
.terminal-card {
  background: #0a0e13;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow), var(--glow);
  font-family: var(--font-mono);
}

.terminal-header {
  background: #161d26;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #28c840; }

.terminal-title {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 1.5rem;
  font-size: 0.82rem;
  line-height: 1.9;
}

.terminal-body .cmd  { color: var(--green); }
.terminal-body .key  { color: var(--cyan); }
.terminal-body .val  { color: var(--yellow); }

.blink-cursor {
  color: var(--cyan);
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ═══════════════════════════════════════════════════
   SKILLS
═══════════════════════════════════════════════════ */
.skills-section {
  background: linear-gradient(180deg, var(--bg) 0%, #0d1117 100%);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.25s, transform 0.25s;
}

.skill-card:hover {
  border-color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: var(--glow);
}

.skill-category {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.9rem;
  color: var(--text);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.skill-item:hover {
  background: rgba(0,229,255,0.06);
}

.skill-icon { font-size: 1.1rem; }

/* ═══════════════════════════════════════════════════
   EXPERIENCE
═══════════════════════════════════════════════════ */
.experience-section { background: var(--bg); }

.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--border), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-dot {
  position: absolute;
  left: -2.92rem;
  top: 1.6rem;
  width: 14px; height: 14px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--cyan);
  border: 2px solid var(--bg);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.25s;
}

.timeline-card:hover {
  border-color: rgba(0,229,255,0.3);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.job-role {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.2rem;
}

.job-company {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
}

.job-meta {
  text-align: right;
}

.job-period {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.2rem;
}

.job-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.job-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(255,214,0,0.12);
  color: var(--yellow);
  border: 1px solid rgba(255,214,0,0.3);
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  display: inline-block;
}

.job-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.job-highlights li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.93rem;
  color: var(--text-dim);
}

.job-highlights li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-size: 0.8rem;
}

/* ═══════════════════════════════════════════════════
   PROJECTS
═══════════════════════════════════════════════════ */
.projects-section {
  background: linear-gradient(180deg, #0d1117 0%, var(--bg) 100%);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.project-card:hover {
  border-color: rgba(0,229,255,0.3);
  transform: translateY(-5px);
  box-shadow: var(--glow);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-icon {
  font-size: 2.2rem;
}

.project-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(0,229,255,0.08);
  color: var(--cyan);
  border: 1px solid rgba(0,229,255,0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.project-footer {
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
}

.project-placeholder {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════ */
.contact-section { background: var(--bg); }

.contact-intro {
  max-width: 600px;
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 3rem;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.5rem;
  text-align: center;
  transition: border-color 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.contact-card:hover {
  border-color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: var(--glow);
}

.contact-icon  { font-size: 2rem; }
.contact-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  text-transform: uppercase;
}
.contact-value { font-size: 0.88rem; color: var(--text-dim); }

/* CHANGE 4: Visual indicator for unset social link placeholders */
.contact-card--placeholder {
  opacity: 0.7;
  border-style: dashed;
}

.contact-placeholder-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--yellow);
  background: rgba(255, 214, 0, 0.08);
  border: 1px solid rgba(255, 214, 0, 0.25);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.2rem;
}

/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer strong { color: var(--text-dim); }

.footer-mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ═══════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════ */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .terminal-card { order: -1; }
  .job-header { flex-direction: column; }
  .job-meta { text-align: left; }
}

@media (max-width: 680px) {
  .navbar { padding: 1rem 1.5rem; }
  .nav-links { display: none; }  /* hide links on very small screens */
  .hero-content { padding: 100px 0 60px; }
  .section { padding: 70px 0; }
  .hero-stats { gap: 1rem; }
  .stat-divider { display: none; }
}
