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

:root {
  --bg:        #0a0a0a;
  --bg-alt:    #111111;
  --bg-card:   #161616;
  --border:    #262626;
  --text:      #e0e0e0;
  --text-dim:  #8a8a8a;
  --text-muted:#555555;
  --accent:    #00d4aa;
  --accent-dim:#00a080;
  --keyword:   #c792ea;
  --string:    #c3e88d;
  --comment:   #546e7a;
  --func:      #82aaff;
  --type:      #ffcb6b;
  --line-num:  #3a3a3a;
  --font: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent); }
.bracket { color: var(--text-muted); }

/* ========== MAINTENANCE ========== */
.maintenance {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(0,212,170,.08), transparent 60%), var(--bg);
  padding: 24px;
  z-index: 9999;
}

.maintenance-box {
  max-width: 520px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 48px 40px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}

.maintenance-icon {
  font-size: 42px;
  color: var(--accent);
  margin-bottom: 20px;
  display: inline-block;
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.maintenance-box h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}

.maintenance-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  letter-spacing: .05em;
}

.maintenance-text {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 28px;
}

.maintenance-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.maintenance-bar-fill {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius: 2px;
  animation: loading 1.6s ease-in-out infinite;
}

@keyframes loading {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,10,10,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.nav-brand { font-size: 16px; font-weight: 700; color: var(--text); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}

.nav-links a { font-size: 13px; color: var(--text-dim); transition: color .2s; }
.nav-links a:hover { color: var(--accent); opacity: 1; }

.nav-cta {
  padding: 6px 14px;
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  color: var(--accent) !important;
}

.nav-cta:hover { background: rgba(0,212,170,.08); }

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(0,212,170,.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.hero-greeting { font-size: 14px; color: var(--text-dim); margin-bottom: 8px; letter-spacing: .05em; }

.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -.02em;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-desc {
  max-width: 600px;
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.stat { display: flex; flex-direction: column; }

.stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ========== BUTTONS ========== */
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .25s;
  letter-spacing: .02em;
}

.btn-primary { background: var(--accent); color: #0a0a0a; font-weight: 700; }
.btn-primary:hover { background: var(--accent-dim); opacity: 1; transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent-dim); color: var(--accent); opacity: 1; }

.btn-full { width: 100%; }

/* ========== CODE WINDOW ========== */
.code-window {
  margin-top: 60px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 13px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #1a1a1a;
  border-bottom: 1px solid var(--border);
}

.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.code-filename { margin-left: 12px; color: var(--text-dim); font-size: 12px; }
.code-status { margin-left: auto; color: var(--accent-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

.code-body {
  padding: 20px 16px;
  overflow-x: auto;
  line-height: 1.7;
  color: var(--text);
}

.code-body .line-num { display: inline-block; width: 32px; color: var(--line-num); user-select: none; text-align: right; margin-right: 16px; }
.code-body .keyword  { color: var(--keyword); }
.code-body .string   { color: var(--string); }
.code-body .comment  { color: var(--comment); font-style: italic; }
.code-body .func     { color: var(--func); }
.code-body .type     { color: var(--type); }

.code-footer {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  background: #1a1a1a;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

/* ========== SECTIONS ========== */
.section { padding: 100px 0; border-top: 1px solid var(--border); }
.section-header { margin-bottom: 16px; }

.section-comment { font-size: 13px; color: var(--text-muted); letter-spacing: .04em; }

.section-title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -.01em;
}

.section-text {
  max-width: 680px;
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 16px;
  line-height: 1.85;
}

/* ========== PRINCIPLES ========== */
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.principle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  transition: border-color .3s, transform .3s;
}

.principle:hover { border-color: var(--accent-dim); transform: translateY(-2px); }

.principle-icon { color: var(--accent); font-size: 18px; display: block; margin-bottom: 12px; }
.principle h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.principle p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ========== TIMELINE ========== */
.timeline { margin-top: 48px; position: relative; padding-left: 28px; }

.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 1px;
  background: var(--border);
}

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

.timeline-item::before {
  content: '';
  position: absolute;
  left: -26px; top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-date {
  font-size: 12px;
  color: var(--accent-dim);
  letter-spacing: .06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.timeline-item h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.timeline-item p { font-size: 14px; color: var(--text-dim); max-width: 560px; line-height: 1.7; }

/* ========== SKILLS ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 48px;
}

.skill-group-title { font-size: 15px; font-weight: 600; color: var(--accent); margin-bottom: 20px; letter-spacing: .02em; }

.skill {
  display: grid;
  grid-template-columns: 150px 1fr 44px;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.skill-name {
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius: 3px;
  transition: width 1s ease;
}

.skill-percent { font-size: 12px; color: var(--text-muted); text-align: right; }

/* ========== PROJECTS ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
  margin-top: 48px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  transition: border-color .3s, transform .3s;
  display: flex;
  flex-direction: column;
}

.project-card:hover { border-color: var(--accent-dim); transform: translateY(-3px); }

.project-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.project-icon { font-size: 22px; color: var(--accent); }

.project-status {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.project-status.live { color: var(--accent); background: rgba(0,212,170,.1); border: 1px solid rgba(0,212,170,.25); }

.project-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }

.project-type {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}

.project-desc { font-size: 13.5px; color: var(--text-dim); line-height: 1.75; margin-bottom: 20px; flex: 1; }

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }

.project-tags span {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(255,255,255,.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.project-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* ========== CONTACTS ========== */
.contacts {
  background: linear-gradient(180deg, var(--bg) 0%, #0d0d0d 100%);
  position: relative;
}

.contacts::before {
  content: '';
  position: absolute;
  bottom: 0; left: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,212,170,.05) 0%, transparent 70%);
  pointer-events: none;
}

.contacts .container { position: relative; z-index: 1; }

.contacts-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 48px;
}

.contact-list { display: flex; flex-direction: column; gap: 12px; }

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  transition: all .25s;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform .25s;
}

.contact-card:hover { border-color: var(--accent-dim); transform: translateX(4px); opacity: 1; }
.contact-card:hover::before { transform: scaleY(1); }

.contact-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,212,170,.08);
  border: 1px solid rgba(0,212,170,.2);
  border-radius: 8px;
  color: var(--accent);
  font-size: 16px;
  flex-shrink: 0;
}

.contact-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }

.contact-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 2px;
}

.contact-value {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-arrow {
  color: var(--text-muted);
  font-size: 16px;
  transition: transform .25s, color .25s;
}

.contact-card:hover .contact-arrow { color: var(--accent); transform: translateX(4px); }

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }

.form-field { display: flex; flex-direction: column; gap: 6px; }

.form-field span {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.form-field input,
.form-field textarea {
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  outline: none;
  transition: border-color .2s, background .2s;
  resize: vertical;
}

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

.form-field input:focus,
.form-field textarea:focus { border-color: var(--accent-dim); background: #0f0f0f; }

.form-note { font-size: 11.5px; color: var(--text-muted); text-align: center; margin-top: 4px; }

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

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

.footer-brand { font-size: 16px; font-weight: 700; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }

.footer-links a { font-size: 13px; color: var(--text-dim); transition: color .2s; }
.footer-links a:hover { color: var(--accent); opacity: 1; }

.footer-copy { font-size: 12px; color: var(--text-muted); width: 100%; text-align: center; margin-top: 8px; }

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

@media (max-width: 768px) {
  .navbar { position: sticky; }
  .nav-links { gap: 14px; }
  .nav-links li:not(:last-child) { display: none; }

  .hero { padding: 60px 0 40px; min-height: auto; }
  .hero-stats { gap: 28px; }
  .stat-num { font-size: 22px; }

  .code-body { font-size: 11px; }

  .skill { grid-template-columns: 110px 1fr 38px; }
  .skill-name { font-size: 12px; }

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

  .footer-content { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
  .section { padding: 60px 0; }
  .principles { grid-template-columns: 1fr; }
  .skill { grid-template-columns: 1fr 38px; }
  .skill-bar { grid-column: 1 / -1; order: 3; }
  .skill-name { order: 1; }
  .skill-percent { order: 2; }

  .contact-form { padding: 20px; }
  .contact-card { padding: 14px 16px; gap: 12px; }
  .contact-icon { width: 36px; height: 36px; font-size: 14px; }
  .contact-value { font-size: 13px; }

  .maintenance-box { padding: 32px 24px; }
  .maintenance-box h1 { font-size: 22px; }
}