/* ========================================================
  VARIABLES & SETUP
  ========================================================
*/
:root {
  --bg-color: #050505;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.12);
  --text-main: #f5f5f7;
  --text-muted: #a1a1a6;
  --accent-purple: #7928ca;
  --accent-blue: #0070f3;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "JetBrains Mono", Menlo, monospace;
}

/* ========================================================
  BASE SECTION STYLES
  ========================================================
*/
.contact-section {
  position: relative;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  padding: 120px 20px;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* Subtle Grid Background (Linear/Vercel aesthetic) */
.contact-bg-grid {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Blurred Gradient Orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}
.orb-purple {
  width: 40vw;
  height: 40vw;
  background: var(--accent-purple);
  top: -10%;
  left: -10%;
}
.orb-blue {
  width: 35vw;
  height: 35vw;
  background: var(--accent-blue);
  bottom: -10%;
  right: -5%;
}

.contact-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  width: 100%;
}

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

/* ========================================================
  TYPOGRAPHY & LEFT COLUMN
  ========================================================
*/
.contact-header {
  margin-bottom: 2.5rem;
}

.contact-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.contact-title span {
  background: linear-gradient(135deg, #fff 0%, #a1a1a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contact-subtitle {
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: 90%;
}

/* ========================================================
  GLASSMORPHISM CARDS
  ========================================================
*/
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  border-color: var(--glass-highlight);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #fff;
  letter-spacing: -0.02em;
}

/* Icon Lists */
.icon-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.icon-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.icon-list li:hover {
  color: var(--text-main);
}

.icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  font-size: 1rem;
}

/* ========================================================
  FORM & INPUTS
  ========================================================
*/
.form-card {
  padding: 2.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-blue);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.15);
}

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

.submit-btn {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  margin-top: 0.5rem;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.submit-btn .arrow {
  transition: transform 0.3s ease;
}

.submit-btn:hover .arrow {
  transform: translateX(4px);
}

/* ========================================================
  TERMINAL SUCCESS STATE
  ========================================================
*/
.terminal-success {
  background: #0d1117; /* GitHub Dark / Deep Terminal */
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  overflow: hidden;
  height: 100%;
  min-height: 400px;
  animation: fadeIn 0.5s ease forwards;
}

.terminal-success.hidden {
  display: none;
}

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

.dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #8b949e;
}

.terminal-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
}

.term-line {
  margin-bottom: 8px;
  opacity: 0;
  animation: typeLine 0.1s forwards;
}
.term-prompt { color: var(--accent-blue); margin-right: 8px; font-weight: bold; }
.term-success { color: #3fb950; }
.term-text { color: #c9d1d9; }
.term-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: #c9d1d9;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes typeLine { to { opacity: 1; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }

/* ========================================================
  SOCIAL LINKS CARD
  ========================================================
*/
.links-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.3s ease;
}

.social-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-border);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.social-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.social-info svg {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.social-row:hover .social-info svg {
  color: var(--text-main);
}

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

/* ========================================================
  ANIMATIONS & RESPONSIVE
  ========================================================
*/
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .orb-purple { width: 60vw; height: 60vw; }
  .orb-blue { width: 50vw; height: 50vw; }
}

@media (max-width: 768px) {
  .contact-section { padding: 80px 16px; }
  .contact-title { font-size: 2.2rem; }
  .form-card, .glass-card { padding: 1.5rem; }
  
  .social-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}