@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&family=Barlow:wght@400;500;600;700;800;900&display=swap');

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root {
    /* Core palette — dark green-tinted background like reference */
    --bg: #080f08;
    --bg2: #0c140c;
    --surface: #111a11;
    --surface2: #162016;
    --border: rgba(74, 222, 128, 0.08);
    --border2: rgba(74, 222, 128, 0.16);

    /* Accent — bright emerald green */
    --accent: #4ade80;
    --accent-dim: rgba(74, 222, 128, 0.1);
    --accent-glow: rgba(74, 222, 128, 0.25);
    --accent-dark: rgba(74, 222, 128, 0.06);

    /* Text */
    --text: #6b7280;
    --text-hi: #d1d5db;
    --white: #f9fafb;

    /* Fonts */
    --font-body: 'Space Grotesk', sans-serif;
    --font-heading: 'Barlow', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Sizing */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --section-pad: 110px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   GLOBAL
   ========================================================================== */
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 32px);
}

section {
    padding: clamp(60px, 15vw, var(--section-pad)) 0;
}

.section-alt {
    background: var(--bg2);
}

/* Section headers */
.section-header {
    margin-bottom: 64px;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-slash {
    color: var(--accent);
    font-weight: 700;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    line-height: 1;
}

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

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #000;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #86efac;
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border2);
    color: var(--text-hi);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 11px 24px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.76rem;
}

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

.disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

/* Hire Me nav button */
.btn-hire {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: #000;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.78rem;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-hire:hover {
    background: #86efac;
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ==========================================================================
   SCROLL PROGRESS & SCROLL-TOP
   ========================================================================== */
#scrollProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
    z-index: 9999;
    transition: width 0.1s linear;
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #000;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: var(--transition);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: #86efac;
    transform: translateY(-3px);
}

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

header.scrolled {
    padding: 12px 0;
    background: rgba(8, 15, 8, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    color: #000;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
}

.logo span {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--white);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
}

.nav-links a.active {
    color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-hi);
    border-radius: 2px;
    transition: var(--transition);
}

/* ==========================================================================
   MOBILE DRAWER
   ========================================================================== */
.mobile-drawer {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 1500;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.mobile-drawer.open {
    display: flex;
}

.drawer-close {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 1.4rem;
    color: var(--text-hi);
    cursor: pointer;
    transition: color var(--transition);
}

.drawer-close:hover {
    color: var(--accent);
}

.mobile-drawer ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.drawer-link {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-hi);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color var(--transition);
}

.drawer-link:hover {
    color: var(--accent);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

/* Subtle grid bg */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(74, 222, 128, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 222, 128, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
}

/* Glow blob */
.hero::after {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-name {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 900;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.92;
    margin-bottom: 32px;
}

.hero-sub {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.04em;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text);
    max-width: 560px;
    line-height: 1.8;
    margin-bottom: 44px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* ==========================================================================
   SERVICES — WHAT I CAN DO
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.service-card {
    background: var(--surface);
    padding: 44px 36px;
    position: relative;
    transition: var(--transition);
    border-right: 1px solid var(--border);
}

.service-card:last-child {
    border-right: none;
}

.service-card:hover {
    background: var(--surface2);
}

.service-card:hover .service-icon {
    color: var(--accent);
}

.service-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.5;
    margin-bottom: 24px;
    letter-spacing: 0.1em;
}

.service-icon {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ==========================================================================
   HOW I WORK — PROCESS
   ========================================================================== */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.process-step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    position: relative;
    transition: var(--transition);
    overflow: hidden;
}

.process-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.process-step:hover::before {
    transform: scaleX(1);
}

.process-step:hover {
    border-color: var(--border2);
    transform: translateY(-4px);
}

.process-num {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.2;
    line-height: 1;
    margin-bottom: 20px;
    letter-spacing: -0.04em;
}

.process-step:hover .process-num {
    opacity: 0.5;
}

.process-step h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.process-step p {
    font-size: 0.88rem;
    line-height: 1.65;
}

/* ==========================================================================
   ABOUT ME
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.about-left,
.about-right {
    min-width: 0;
}

/* Identity Card — left */

.identity-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
}

.identity-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.identity-top {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.identity-photo {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border2);
    flex-shrink: 0;
}

.identity-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.identity-name {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.identity-quote {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-hi);
    line-height: 1.7;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.identity-bio {
    font-size: 0.88rem;
    line-height: 1.75;
    margin-bottom: 28px;
}

.identity-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}


.stat-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.stat-value {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-hi);
}

/* Philosophy — right */
.about-right {
    padding-top: 8px;
}

.philosophy-heading {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 900;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    line-height: 1.05;
    margin: 14px 0 40px;
}

.attr-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.attr-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    transition: background var(--transition);
}

.attr-item:last-child {
    border-bottom: none;
}

.attr-item:hover {
    background: var(--surface2);
}

.attr-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-dim);
    border: 1px solid var(--border2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.attr-item:hover .attr-icon {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.attr-body h4 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.attr-body p {
    font-size: 0.85rem;
    line-height: 1.65;
}

/* ==========================================================================
   EXPERIENCE / TIMELINE
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 860px;
    padding-left: 28px;
    border-left: 1px solid var(--border2);
}

.timeline-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 32px;
    position: relative;
}

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

.tl-dot {
    position: absolute;
    left: -35px;
    top: 24px;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg2);
    box-shadow: 0 0 0 3px var(--accent-dim), 0 0 14px var(--accent-glow);
}

/* Remove old tl-year/tl-line since we no longer use them */
.tl-year {
    display: none;
}

.tl-line {
    display: contents;
}

.tl-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    transition: var(--transition);
}

.tl-card:hover {
    border-color: var(--border2);
    transform: translateX(4px);
}

.tl-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid var(--border2);
    padding: 3px 12px;
    border-radius: 4px;
    letter-spacing: 0.1em;
    display: inline-block;
    margin-bottom: 14px;
}

.tl-card h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.tl-card h4 {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 12px;
}

.tl-card p {
    font-size: 0.88rem;
    line-height: 1.7;
}

/* ==========================================================================
   SKILLS
   ========================================================================== */
.skills-desc {
    text-align: center;
    margin-bottom: 48px;
}

.skills-sub-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.12em;
    margin-bottom: 10px;
}

.skills-desc p:not(.skills-sub-title) {
    font-size: 0.92rem;
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.75;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 16px;
    background: var(--surface);
    transition: var(--transition);
    cursor: default;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.tech-item:hover {
    background: var(--surface2);
}

.tech-item:hover i {
    color: var(--accent);
}

.tech-item:hover span {
    color: var(--text-hi);
}

.tech-item i {
    font-size: 1.9rem;
    color: var(--text);
    transition: color var(--transition);
}

.tech-item span {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text);
    transition: color var(--transition);
    letter-spacing: 0.04em;
    text-align: center;
}

.skills-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.skill-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-mono);
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    letter-spacing: 0.04em;
    transition: var(--transition);
}

.skill-badge:hover {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--border2);
}

/* ==========================================================================
   PROJECTS
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--border2);
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(74, 222, 128, 0.06);
}

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: grayscale(20%);
}

.project-card:hover .project-image img {
    transform: scale(1.06);
    filter: grayscale(0%);
}

.project-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--surface2) 0%, #111d11 100%);
}

.placeholder-blue {
    background: linear-gradient(135deg, #0d1120 0%, #161a30 100%);
}

.placeholder-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.placeholder-inner i {
    font-size: 2.2rem;
    color: var(--accent);
    opacity: 0.5;
}

.placeholder-blue .placeholder-inner i {
    color: #818cf8;
}

.placeholder-inner span {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.project-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.project-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.15em;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.project-tags span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 3px;
    background: var(--accent-dark);
    color: var(--accent);
    border: 1px solid var(--border2);
    letter-spacing: 0.04em;
}

.project-body h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}

.project-body p {
    font-size: 0.87rem;
    line-height: 1.7;
    flex: 1;
}

.project-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 360px) 1fr;
    gap: 40px;
    align-items: start;
}

.contact-grid>* {
    min-width: 0;
}



.contact-info>.section-label {
    margin-bottom: 24px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-bottom: 4px;
}

.contact-row:hover {
    border-color: var(--border2);
    background: var(--surface2);
    transform: translateX(4px);
}

.contact-row:hover .contact-icon {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-dim);
    border: 1px solid var(--border2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.clabel {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.cval {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-hi);
}

/* 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-group label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 13px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(107, 114, 128, 0.6);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
    outline: none;
}

.contact-form textarea {
    resize: vertical;
    min-height: 130px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    background: #050808;
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-logo {
    font-size: 1.2rem;
}

.footer-brand p {
    font-size: 0.88rem;
    line-height: 1.8;
    max-width: 380px;
    margin-bottom: 24px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 0.9rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    transform: translateY(-3px);
}

.footer-nav h4 {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav ul a {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color var(--transition);
}

.footer-nav ul a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 28px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 8px;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

/* ==========================================================================
   REVEAL ANIMATION
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   CYBER CHATBOT UI SYSTEM 
============================================= */

/* 1. Floating Widget Container (Bottom Right) */
.cyber-chat-widget {
    position: fixed;
    bottom: clamp(15px, 3vw, 25px);
    right: clamp(15px, 3vw, 25px);
    z-index: 1000;
    font-family: 'Space Grotesk', monospace;
}

/* 2. Floating Toggle Button */
.chat-toggle-btn {
    width: clamp(48px, 10vw, 55px);
    height: clamp(48px, 10vw, 55px);
    background-color: #0b0f12;
    border: 1px solid #00ff66;
    border-radius: 4px;
    /* Boxy cyber style */
    color: #00ff66;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.2);
    transition: all 0.3s ease;
    position: relative;
    min-width: 48px;
    min-height: 48px;
}

.chat-toggle-btn:hover {
    background-color: #00ff66;
    color: #0b0f12;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.5);
}

/* Green Status Dot notification */
.chat-toggle-btn::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background-color: #00ff66;
    border-radius: 50%;
    border: 2px solid #0b0f12;
}

/* 3. Main Chat Terminal Box Window - Responsive */
.chat-container {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    max-height: 500px;
    background-color: #0b0f12;
    border: 1px solid #1a232a;
    border-top: 3px solid #00ff66;
    /* Neon accent header bar */
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(450px);
    opacity: 0;
    pointer-events: none;
    /* Hidden by default */
    z-index: 999;
}

/* Toggle Class when Open */
.chat-container.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

/* 4. Chat Header */
.chat-header {
    background-color: #0e1418;
    padding: 12px 15px;
    border-bottom: 1px solid #1a232a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.system-title {
    color: #ffffff;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 1px;
}

.system-version {
    color: #00ff66;
    font-size: 10px;
    opacity: 0.7;
}

.close-chat-btn {
    background: none;
    border: none;
    color: #556c7d;
    cursor: pointer;
    font-size: 16px;
}

.close-chat-btn:hover {
    color: #ff3333;
}

/* 5. Messages Display Box Area */
.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Custom Scrollbar for Terminal look */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #1a232a;
}

/* Message Bubble Structures */
.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.message .tag {
    font-size: 9px;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.message .content {
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
    border-radius: 2px;

    /* CRITICAL FIX FOR TEXT TRUNCATION */
    white-space: pre-wrap;
    /* Respects breaks and wraps text naturally */
    word-break: break-word;
    /* Forces long words/links to break down instead of overflowing */
}

/* System Response Styling */
.message.system {
    align-self: flex-start;
}

.message.system .tag {
    color: #556c7d;
}

.message.system .content {
    background-color: #12191f;
    color: #e2e8f0;
    border-left: 2px solid #556c7d;
}

/* User Query Styling */
.message.user {
    align-self: flex-end;
}

.message.user .tag {
    color: #00ff66;
    text-align: right;
}

.message.user .content {
    background-color: #0c1c15;
    color: #00ff66;
    border-right: 2px solid #00ff66;
    text-align: left;
}

/* 6. Form Input Panel */
.chat-input-area {
    padding: 12px;
    background-color: #0e1418;
    border-top: 1px solid #1a232a;
    display: flex;
    gap: 8px;
}

.chat-input-area input {
    flex: 1;
    background-color: #070a0d;
    border: 1px solid #1a232a;
    padding: 10px;
    color: #00ff66;
    font-family: monospace;
    font-size: 12px;
}

.chat-input-area input:focus {
    outline: none;
    border-color: #00ff66;
}

.send-btn {
    background-color: #070a0d;
    border: 1px solid #1a232a;
    color: #00ff66;
    padding: 0 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    background-color: #0c1c15;
    border-color: #00ff66;
}
/* ==========================================================================
   TERMINAL CHAT TYPING INDICATOR (4 MOVING DOTS ENGINE)
   ========================================================================== */
/* ==========================================================================
   TERMINAL CHAT TYPING INDICATOR (4 MOVING DOTS ENGINE)
   ========================================================================== */

.typing-indicator .content {
    color: #e61054; /* Vibrant matrix green text (Old color was #64748b) */
    font-style: italic;
    display: flex;
    align-items: center;
    font-weight: 500; /* Makes it slightly sharper in the console */
}

.typing-indicator .dots {
    display: inline-block;
    vertical-align: bottom;
    color: #22c55e; /* Ensures the dots match the green prompt text */
    width: 16px; 
    overflow: hidden;
    white-space: nowrap;
    text-align: left;
    animation: movingFourDots 2s infinite steps(5);
    margin-left: 2px;
}

@keyframes movingFourDots {
    0%   { width: 0px; }
    20%  { width: 4px; }   
    40%  { width: 8px; }   
    60%  { width: 12px; }  
    80%  { width: 16px; }  
    100% { width: 0px; }   
}

/* View Messages Button */
.view-messages-btn {
    background: none;
    border: none;
    color: #556c7d;
    cursor: pointer;
    font-size: 16px;
    padding: 0 8px;
    transition: color 0.3s;
}

.view-messages-btn:hover {
    color: #00ff66;
}

/* Stored Messages View Container */
.stored-messages-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    background-color: #0b0f12;
    border-top: 1px solid #1a232a;
}

.messages-header {
    background-color: #0e1418;
    padding: 12px 15px;
    border-bottom: 1px solid #1a232a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #00ff66;
    font-size: 12px;
    letter-spacing: 1px;
}

.back-to-chat-btn {
    background: none;
    border: none;
    color: #00ff66;
    cursor: pointer;
    font-size: 12px;
    padding: 0 8px;
    transition: color 0.3s;
}

.back-to-chat-btn:hover {
    color: #4ade80;
}

/* Messages List Container */
.messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.messages-list::-webkit-scrollbar {
    width: 4px;
}

.messages-list::-webkit-scrollbar-thumb {
    background: #1a232a;
}

/* Individual Stored Message Item */
.stored-message-item {
    background-color: #070a0d;
    border: 1px solid #1a232a;
    border-radius: 4px;
    padding: 10px;
    font-size: 11px;
    line-height: 1.4;
}

.message-question {
    color: #00ff66;
    margin-bottom: 6px;
    word-break: break-word;
}

.message-question strong {
    color: #4ade80;
}

.message-answer {
    color: #e2e8f0;
    margin-bottom: 6px;
    word-break: break-word;
}

.message-answer strong {
    color: #556c7d;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #556c7d;
    border-top: 1px solid #1a232a;
    padding-top: 6px;
    margin-top: 6px;
}

.timestamp {
    flex: 1;
}

.usage-count {
    text-align: right;
}

/* Loading and Empty States */
.loading-text,
.no-messages,
.error-text {
    color: #556c7d;
    text-align: center;
    padding: 20px;
    font-size: 12px;
    font-style: italic;
}

.error-text {
    color: #ff3333;
}

@media (max-width: 1100px) {
    .tech-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .chat-container {
        max-width: 380px;
    }
}

@media (max-width: 992px) {
    /* Stack layout elements vertically on tablets */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

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

    .service-card {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .service-card:last-child {
        border-bottom: none;
    }

    .chat-container {
        max-width: 360px;
    }
}

@media (max-width: 900px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-name {
        font-size: clamp(3.5rem, 12vw, 7rem);
    }
}

@media (max-width: 768px) {
    :root {
        --section-pad: 80px;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

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

    .hero-name {
        font-size: clamp(2.5rem, 10vw, 5rem);
    }

    .section-title {
        font-size: clamp(1.8rem, 7vw, 3.5rem);
    }

    /* Mobile Chat: Full-width drawer on bottom */
    .chat-container {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
        border: none;
        border-top: 3px solid #00ff66;
        transform: translateY(100%);
    }

    .chat-container.active {
        transform: translateY(0);
    }

    .chat-messages {
        max-height: calc(70vh - 120px);
    }

    /* Overlay backdrop */
    .chat-container.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 clamp(12px, 3vw, 20px);
    }

    .hero-name {
        font-size: clamp(2rem, 9vw, 4rem);
    }

    .section-title {
        font-size: clamp(1.5rem, 6vw, 2.8rem);
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .process-step {
        padding: 20px;
    }

    /* Ensure chat fits on small phones */
    .chat-container {
        max-height: 80vh;
    }

    .chat-messages {
        max-height: calc(80vh - 120px);
    }
}

@media (max-width: 480px) {
    :root {
        --section-pad: 60px;
    }

    .container {
        padding: 0 16px;
    }

    .hero-name {
        font-size: clamp(1.75rem, 8vw, 3rem);
        line-height: 0.9;
        margin-bottom: 24px;
    }

    .section-title {
        font-size: clamp(1.4rem, 5.5vw, 2.2rem);
    }

    .hero-label {
        font-size: clamp(0.65rem, 2.5vw, 0.75rem);
    }

    .hero-sub {
        font-size: clamp(0.85rem, 2vw, 0.95rem);
    }

    .hero-desc {
        font-size: clamp(0.9rem, 2vw, 1rem);
        margin-bottom: 24px;
    }

    .btn-primary,
    .btn-outline {
        font-size: clamp(0.65rem, 2vw, 0.82rem);
        padding: clamp(10px 16px, 2vw, 12px 24px);
    }

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

    /* Stack form row items */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Footer adjustments */
    .footer-top {
        grid-template-columns: 1fr;
    }

    /* Floating button size adjustment */
    .chat-toggle-btn {
        width: 48px;
        height: 48px;
    }

    /* Chat takes full viewport on tiny screens */
    .chat-container {
        border-radius: 12px 12px 0 0;
        max-height: 85vh;
    }

    .chat-header {
        padding: 12px;
    }

    .system-title {
        font-size: 12px;
    }

    .system-version {
        font-size: 9px;
    }

    .message .content {
        font-size: 12px;
        padding: 8px 10px;
    }

    .message .tag {
        font-size: 8px;
    }
}

/* GraviTalk Project Card placeholder style */
.placeholder-purple {
    background: linear-gradient(135deg, #1f1138 0%, #0d061a 100%);
}

.placeholder-purple .placeholder-inner i {
    color: #a855f7;
}

    
