/* ─── ACCESSIBILITY ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus visible for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  :root {
    --border: rgba(255,255,255,0.15);
    --card: rgba(255,255,255,0.08);
  }
}

/* Dark mode is default, but support light mode preference */
@media (prefers-color-scheme: light) {
  body {
    background: #f5f5f5;
    color: #333;
  }
}

:root {
  --bg:        #0b0f1a;
  --bg2:       #0f1624;
  --bg3:       #141d2e;
  --border:    rgba(255,255,255,0.07);
  --cyan:      #00c8ff;
  --cyan2:     #00a3cc;
  --text:      #e2e8f0;
  --muted:     #7a8ba0;
  --card:      rgba(255,255,255,0.04);
  --card-hover:rgba(255,255,255,0.07);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--cyan2); border-radius: 3px; }

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  background: rgba(11,15,26,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--text);
  text-transform: uppercase;
}



.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--muted); font-size: 13px; text-decoration: none;
  letter-spacing: 0.02em; transition: color .2s;
}
.nav-links a:hover { color: var(--text); }

.btn-resume {
  background: var(--cyan); color: #0b0f1a !important;
  padding: 8px 20px; border-radius: 6px;
  font-weight: 700; font-size: 13px !important;
  letter-spacing: 0.04em; transition: background .2s, transform .15s !important;
}
.btn-resume:hover { background: var(--cyan2) !important; transform: translateY(-1px); }

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

/* animated dot grid bg */
#hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 50% 40%, rgba(0,200,255,0.06) 0%, transparent 60%),
    radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 100% 100%, 30px 30px;
  pointer-events: none;
}

.hero-badges {
  display: flex; gap: 10px; margin-bottom: 28px;
  flex-wrap: wrap; justify-content: center;
}
.badge {
  border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 14px;
  font-family: 'Space Mono', monospace;
  font-size: 10px; letter-spacing: 0.1em;
  color: var(--muted); text-transform: uppercase;
  display: flex; align-items: center; gap: 6px;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.8); }
}

.hero-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: clamp(42px, 8vw, 88px);
  line-height: 1.0; letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.hero-name em {
  font-style: italic; color: var(--cyan);
}

.hero-role {
  font-size: 14px; color: var(--cyan);
  letter-spacing: 0.04em; margin-bottom: 20px;
  font-family: 'Space Mono', monospace;
}
.hero-role span { color: var(--muted); margin: 0 8px; }

.hero-desc {
  max-width: 540px; color: var(--muted);
  font-size: 15px; line-height: 1.7;
  margin-bottom: 36px;
}

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text); background: transparent;
  padding: 12px 28px; border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: border-color .2s, background .2s, transform .15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline:hover {
  border-color: var(--cyan); background: rgba(0,200,255,0.06);
  transform: translateY(-2px);
}
.btn-primary {
  border: 1px solid transparent;
  background: rgba(0,200,255,0.12);
  color: var(--cyan) !important;
}
.btn-primary:hover { background: rgba(0,200,255,0.2) !important; }

.scroll-hint {
  margin-top: 64px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 10px; letter-spacing: 0.15em;
  color: var(--muted); text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: scrollDrop 1.5s ease-in-out infinite;
}
@keyframes scrollDrop {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}

/* ─── SECTIONS ─── */
section { padding: 100px 48px; max-width: 1100px; margin: 0 auto; }

.section-tag {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 10px; letter-spacing: 0.15em;
  color: var(--cyan); text-transform: uppercase;
  border: 1px solid rgba(0,200,255,0.3);
  padding: 4px 12px; border-radius: 4px;
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700; font-size: clamp(28px, 5vw, 46px);
  line-height: 1.1; margin-bottom: 48px;
}

/* ─── EXPERIENCE ─── */
#experience { background: var(--bg2); max-width: 100%; padding: 100px 0; }
#experience .inner {
  max-width: 1100px; margin: 0 auto; padding: 0 48px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
}

.exp-role { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 32px; line-height: 1.2; margin-bottom: 8px; }
.exp-company { font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.exp-company a { color: var(--cyan); text-decoration: none; }

.exp-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.exp-list li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14px; color: var(--muted); line-height: 1.6;
}
.exp-list li::before {
  content: '';
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300c8ff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}

/* Terminal card */
.terminal {
  background: #0d1117; border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden; font-family: 'Space Mono', monospace;
  font-size: 12px;
}
.terminal-header {
  background: #161b27; padding: 12px 16px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.term-dot { width: 12px; height: 12px; border-radius: 50%; }
.td-red   { background: #ff5f57; }
.td-yellow{ background: #febc2e; }
.td-green { background: #28c840; }
.terminal-title {
  margin-left: auto; font-size: 11px; color: var(--muted);
}
.terminal-body { padding: 20px; line-height: 2; }
.t-prompt { color: var(--cyan); }
.t-cmd    { color: var(--text); }
.t-key    { color: #79c0ff; }
.t-str    { color: #a5d6a7; }
.t-cursor {
  display: inline-block; width: 8px; height: 14px;
  background: var(--cyan); vertical-align: middle;
  animation: blink .8s infinite;
}
@keyframes blink { 0%,49%{opacity:1} 50%,100%{opacity:0} }

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

.project-card {
  border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  background: var(--card);
  transition: border-color .2s, transform .2s;
}
.project-card:hover { border-color: rgba(0,200,255,0.3); transform: translateY(-4px); }

.project-img {
  width: 100%; height: 200px; object-fit: cover;
  background: #0d1117;
  display: block;
  position: relative; overflow: hidden;
}

.project-img-placeholder {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, #0d1a2e 0%, #0a2040 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Mono', monospace; font-size: 11px;
  color: var(--muted); letter-spacing: 0.05em;
  position: relative; overflow: hidden;
}
.project-img-placeholder::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    rgba(0,200,255,0.03) 8px,
    rgba(0,200,255,0.03) 9px
  );
}

.project-code-bg {
  position: absolute; inset: 0;
  font-family: 'Space Mono', monospace;
  font-size: 10px; line-height: 1.8;
  color: rgba(0,200,255,0.15);
  padding: 16px; overflow: hidden;
  user-select: none;
}

.project-body { padding: 20px 24px 24px; }
.project-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tag {
  font-family: 'Space Mono', monospace; font-size: 9px;
  letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--border); color: var(--muted);
  padding: 3px 10px; border-radius: 4px;
}
.project-name {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 18px; margin-bottom: 8px;
}
.project-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.project-link {
  font-family: 'Space Mono', monospace; font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cyan); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap .2s;
}
.project-link:hover { gap: 10px; }

.project-card-small { background: var(--card); }
.project-badge {
  background: rgba(0,200,255,0.1); color: var(--cyan);
  font-family: 'Space Mono', monospace; font-size: 9px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 4px;
  display: inline-block; margin-bottom: 12px;
}

/* ─── SKILLS ─── */
#skills { background: var(--bg2); max-width: 100%; padding: 100px 0; }
#skills .inner { max-width: 1100px; margin: 0 auto; padding: 0 48px; }

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

.skill-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px;
  transition: border-color .2s, background .2s;
}
.skill-card:hover { border-color: rgba(0,200,255,0.3); background: var(--card-hover); }

.skill-icon {
  width: 32px; height: 32px; margin-bottom: 16px;
  color: var(--cyan);
}

.skill-cat {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); margin-bottom: 14px;
  font-family: 'Space Mono', monospace;
}

.skill-items { display: flex; flex-direction: column; gap: 8px; }
.skill-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}
.skill-level {
  font-size: 11px; font-family: 'Space Mono', monospace;
  color: var(--cyan);
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 12px;
  font-size: 12px;
}

/* ─── ABOUT (edu + achievements) ─── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
}

.about-sub {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 24px;
}
.about-icon { color: var(--cyan); }
.about-sub-title {
  font-family: 'Space Mono', monospace; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
}

.edu-list { display: flex; flex-direction: column; gap: 0; }
.edu-item {
  padding: 20px 0 20px 20px;
  border-left: 2px solid var(--border);
  position: relative;
}
.edu-item::before {
  content: ''; position: absolute; left: -5px; top: 24px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan);
}
.edu-degree { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.edu-school { font-size: 13px; color: var(--cyan); }

.achievement-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px 24px; margin-bottom: 14px;
}
.achievement-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.achievement-desc { font-size: 13px; color: var(--muted); }

/* ─── CONTACT ─── */
#contact { background: var(--bg2); max-width: 100%; padding: 100px 0; }
#contact .inner { max-width: 1100px; margin: 0 auto; padding: 0 48px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }

.contact-desc { color: var(--muted); font-size: 15px; line-height: 1.7; margin-bottom: 36px; }

.contact-info { display: flex; flex-direction: column; gap: 16px; }
.contact-item {
  display: flex; align-items: center; gap: 14px;
  font-size: 14px;
}
.contact-icon-wrap {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--cyan);
}

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-family: 'Space Mono', monospace; font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.form-input, .form-textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px;
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 14px;
  outline: none; transition: border-color .2s;
  width: 100%;
}
.form-input::placeholder, .form-textarea::placeholder { color: rgba(255,255,255,0.2); }
.form-input:focus, .form-textarea:focus { border-color: var(--cyan); }
.form-textarea { resize: vertical; min-height: 120px; }

.btn-send {
  background: var(--cyan); color: #0b0f1a;
  border: none; border-radius: 8px; padding: 14px 28px;
  font-family: 'Space Mono', monospace;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 10px;
  transition: background .2s, transform .15s, opacity .2s;
  width: 100%;
}
.btn-send:hover:not(:disabled) { background: var(--cyan2); transform: translateY(-2px); }
.btn-send:disabled { opacity: 0.7; cursor: not-allowed; }

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(11,15,26,0.3);
  border-top: 2px solid #0b0f1a;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error Message */
.form-error {
  color: #ff6b6b;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 6px;
  background: rgba(255,107,107,0.1);
  border: 1px solid rgba(255,107,107,0.3);
  display: none;
  margin-top: 8px;
  animation: slideIn .3s ease-out;
}
.form-error.show { display: block; }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--muted);
}
.footer-links { display: flex; gap: 28px; }
.footer-links a { color: var(--muted); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 32px; right: 32px;
  background: var(--cyan); color: #0b0f1a;
  padding: 14px 24px; border-radius: 8px;
  font-weight: 700; font-size: 14px;
  transform: translateY(80px); opacity: 0;
  transition: all .3s; z-index: 200;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ─── SCROLL ANIMATIONS ─── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: none; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  nav { padding: 16px 24px; }
  section { padding: 72px 24px; }
  #experience .inner, #skills .inner, #contact .inner { padding: 0 24px; }
  #experience .inner { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  #contact .inner { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 16px; text-align: center; }
  .nav-links { display: none; }
}

@media (max-width: 600px) {
  .skills-grid { grid-template-columns: 1fr; }
}
