/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0f1e;
  --bg-2: #0d1528;
  --bg-card: #111827;
  --bg-card-hover: #1a2236;
  --accent: #00d4ff;
  --accent-2: #7c3aed;
  --accent-glow: rgba(0, 212, 255, 0.15);
  --text: #e2e8f0;
  --text-muted: #8892a4;
  --text-dim: #4a5568;
  --border: rgba(255, 255, 255, 0.07);
  --border-accent: rgba(0, 212, 255, 0.3);
  --radius: 12px;
  --radius-lg: 20px;
  --font: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.12);
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #fff;
}

ul {
  list-style: none;
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.accent {
  color: var(--accent);
}

/* ===========================
   NAVBAR
=========================== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
}

#navbar.scrolled {
  background: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 0;
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
}

.nav-logo .dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--border-accent);
  padding: 6px 18px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition) !important;
}

.nav-cta:hover {
  background: var(--accent-glow);
  color: var(--accent) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: #00b8db;
  color: #000;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-accent);
}

.btn-outline:hover {
  background: var(--accent-glow);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ===========================
   SECTIONS
=========================== */
section {
  padding: 100px 0;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 56px;
  letter-spacing: -0.5px;
}

/* ===========================
   HERO
=========================== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 80% 80% at 50% -20%, rgba(0, 212, 255, 0.08) 0%, transparent 70%),
              radial-gradient(ellipse 50% 50% at 80% 80%, rgba(124, 58, 237, 0.06) 0%, transparent 60%);
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 80%);
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-greeting {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.2s;
}

.hero-name {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.4s;
}

.hero-title {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 24px;
  min-height: 2rem;
  font-family: var(--font-mono);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.6s;
}

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

@keyframes blink {
  50% { opacity: 0; }
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.8s;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 1s;
}

.hero-tags {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 1.2s;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  padding: 4px 12px;
  border-radius: 4px;
}

.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-indicator span {
  display: block;
  width: 20px;
  height: 32px;
  border: 2px solid var(--border-accent);
  border-radius: 10px;
  position: relative;
}

.scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 6px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollDot 1.5s ease infinite;
}

@keyframes scrollDot {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

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

/* ===========================
   ABOUT
=========================== */
#about {
  background: var(--bg-2);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.8;
}

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

.about-info {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.info-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  min-width: 80px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-value {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.available {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #22c55e !important;
}

.dot-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Code block */
.about-card {
  display: flex;
  justify-content: center;
}

.card-inner {
  width: 100%;
  max-width: 380px;
}

.code-block {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow), var(--shadow-glow);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.code-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-header .dot.red    { background: #ff5f57; }
.code-header .dot.yellow { background: #febc2e; }
.code-header .dot.green  { background: #28c840; }

.code-filename {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.code-block pre {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  overflow-x: auto;
}

.c-key  { color: #7dd3fc; }
.c-str  { color: #86efac; }
.c-num  { color: #fbbf24; }
.c-bool { color: #f472b6; }
.c-brace { color: var(--accent); }

/* ===========================
   SKILLS
=========================== */
#skills {
  background: var(--bg);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.skill-category:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}

.skill-category h3 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.skill-pct {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.skill-bar {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 4px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   EXPERIENCE
=========================== */
#experience {
  background: var(--bg-2);
}

.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -39px;
  top: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  transition: background var(--transition);
}

.timeline-item:hover .timeline-dot {
  background: var(--accent);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.timeline-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.timeline-header h4 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
}

.location {
  color: var(--text-muted);
  font-weight: 400;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 3px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  border: 1px solid var(--border);
}

.timeline-date.current {
  color: var(--accent);
  border-color: var(--border-accent);
  background: var(--accent-glow);
}

.timeline-card ul {
  list-style: none;
  margin-bottom: 16px;
}

.timeline-card ul li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 3px 0 3px 16px;
  position: relative;
  line-height: 1.6;
}

.timeline-card ul li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.85rem;
}

.timeline-card ul li strong {
  color: var(--text);
}

/* Tech tags */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tech-tags span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  padding: 2px 10px;
  border-radius: 4px;
}

/* ===========================
   PROJECTS
=========================== */
#projects {
  background: var(--bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

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

.project-card.featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0, 212, 255, 0.04) 100%);
  border-color: var(--border-accent);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

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

.project-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  color: var(--accent);
  font-size: 1.1rem;
  transition: background var(--transition);
}

.project-link:hover {
  background: var(--accent-glow);
  color: var(--accent);
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.project-featured-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.project-card > p:not(.project-featured-badge) {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.project-features {
  list-style: none;
  margin-bottom: 16px;
}

.project-features li {
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 2px 0 2px 16px;
  position: relative;
  line-height: 1.6;
}

.project-features li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.project-domains {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.project-domains a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-accent);
  padding-bottom: 1px;
  transition: color var(--transition);
}

.project-domains a:hover {
  color: var(--accent);
}

/* ===========================
   EDUCATION
=========================== */
#education {
  background: var(--bg);
}

.education-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 600px;
  transition: box-shadow var(--transition);
}

.education-card:hover {
  box-shadow: var(--shadow-glow);
}

.education-icon {
  font-size: 2.4rem;
  flex-shrink: 0;
}

.education-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.education-body h4 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ===========================
   CONTACT
=========================== */
#contact {
  background: var(--bg-2);
}

.contact-intro {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: -36px;
  margin-bottom: 48px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-icon {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--accent-glow);
}

.contact-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.contact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.contact-item a,
.contact-item span:last-child {
  color: var(--text);
  font-size: 0.95rem;
}

.contact-item a:hover {
  color: var(--accent);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===========================
   FOOTER
=========================== */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-inner p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-made {
  color: var(--text-dim) !important;
  font-size: 0.8rem !important;
}

/* ===========================
   ANIMATIONS
=========================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-card {
    order: -1;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 15, 30, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    gap: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 12px 24px;
    font-size: 1rem;
  }

  .nav-cta {
    margin: 8px 24px;
    text-align: center;
  }

  .nav-toggle {
    display: flex;
  }

  .timeline {
    padding-left: 24px;
  }

  .timeline-dot {
    left: -31px;
  }

  .timeline-header {
    flex-direction: column;
    gap: 8px;
  }

  .hero-sub br {
    display: none;
  }

  section {
    padding: 72px 0;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
