/* ========================================
   AMAXO - Precision Lab Aesthetic
   Bold, dark, scientific instrumentation
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Dark foundation */
    --void: #0a0a0c;
    --surface: #111115;
    --surface-raised: #18181d;
    --surface-glow: #1f1f26;

    /* Luminous accent - electric cyan/teal */
    --accent: #00d4aa;
    --accent-dim: #00a88a;
    --accent-glow: rgba(0, 212, 170, 0.15);
    --accent-soft: rgba(0, 212, 170, 0.08);

    /* Secondary warmth */
    --warm: #ff6b35;
    --warm-glow: rgba(255, 107, 53, 0.12);

    /* Text hierarchy */
    --text-primary: #f0f0f2;
    --text-secondary: #a0a0a8;
    --text-muted: #606068;

    /* Functional */
    --border: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(0, 212, 170, 0.3);

    /* Typography */
    --font-main: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

    /* Spatial */
    --max-content: 1200px;
    --max-text: 720px;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 0.15s;
    --duration-normal: 0.3s;
    --duration-slow: 0.6s;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

::selection {
    background: var(--accent);
    color: var(--void);
}

body {
    font-family: var(--font-main);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-secondary);
    background: var(--void);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle animated background grid */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 170, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 170, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: var(--space-md);
    background: var(--accent);
    color: var(--void);
    padding: var(--space-xs) var(--space-sm);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    z-index: 9999;
    border-radius: 0 0 4px 4px;
    transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
    top: 0;
    outline: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ========== HEADER ========== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-content {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.logo-line {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
    transition: color var(--duration-normal) var(--ease-out);
}

.logo::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--accent);
    border-radius: 2px;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

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

.logo:hover::before {
    opacity: 1;
}

.tagline {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.header-rule {
    display: none;
}

.linkedin-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--text-muted);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: all var(--duration-normal) var(--ease-out);
}

.linkedin-header:hover {
    color: var(--accent);
    border-color: var(--border-accent);
    background: var(--accent-soft);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.linkedin-header svg {
    width: 20px;
    height: 20px;
}

/* ========== MAIN CONTENT ========== */
main {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
    min-height: calc(100vh - 200px);
}

/* ========== HERO SECTION (Homepage) ========== */
.hero {
    padding: var(--space-2xl) 0;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--accent-soft);
    border: 1px solid var(--border-accent);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
    animation: fadeSlideUp 0.8s var(--ease-out) both;
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

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

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    animation: fadeSlideUp 0.8s 0.1s var(--ease-out) both;
}

h1 .accent {
    color: var(--accent);
    position: relative;
}

h1 .accent::after {
    content: '';
    position: absolute;
    bottom: 0.1em;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    opacity: 0.4;
    border-radius: 2px;
}

/* Cycling text animation */
.cycle-container {
    position: relative;
    display: inline-block;
}

.cycle-text {
    display: inline-block;
    color: var(--accent);
    position: relative;
    clip-path: inset(0 0% 0 0);
    transition: clip-path 1s var(--ease-out);
    white-space: nowrap;
}

.cycle-text:nth-child(2) {
    position: absolute;
    left: 0;
    top: 0;
}

.cycle-text::after {
    content: '';
    position: absolute;
    bottom: 0.05em;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--warm));
    border-radius: 2px;
    opacity: 0.6;
    clip-path: inherit;
}

/* Fully hidden state */
.cycle-text.cycle-hidden {
    clip-path: inset(0 100% 0 0);
    transition: none;
}

/* Hide from left to right (left edge moves right) */
.cycle-text.fade-out {
    clip-path: inset(0 0 0 100%);
}

/* Start hidden, reveal from left to right */
.cycle-text.fade-in {
    clip-path: inset(0 100% 0 0);
    transition: none;
}

.intro {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: var(--max-text);
    animation: fadeSlideUp 0.8s 0.2s var(--ease-out) both;
}

.intro strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Page title for inner pages */
.page-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: var(--space-xl);
    position: relative;
    display: inline-block;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 2px;
}

/* ========== SECTION HEADERS ========== */
h2 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-family: var(--font-mono);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

h2::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--accent);
}

/* ========== PAGE NAVIGATION ========== */
.page-nav {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
    animation: fadeSlideUp 0.8s 0.3s var(--ease-out) both;
}

.page-nav a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.page-nav a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-glow), transparent);
    opacity: 0;
    transition: opacity var(--duration-normal);
}

.page-nav a:hover {
    color: var(--accent);
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--accent-glow);
}

.page-nav a:hover::before {
    opacity: 1;
}

.page-nav a::after {
    content: '\2192';
    font-size: 1.1em;
    transition: transform var(--duration-normal) var(--ease-spring);
}

.page-nav a:hover::after {
    transform: translateX(4px);
}

.page-nav a[aria-current="page"] {
    background: var(--accent-soft);
    border-color: var(--border-accent);
    color: var(--accent);
}

.page-nav a[aria-current="page"]::after {
    content: '\2713';
}

/* ========== PROFILE LIST ========== */
.profile-list {
    list-style: none;
    display: grid;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.profile-list li {
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
    position: relative;
    padding-left: calc(var(--space-md) + 24px);
    transition: all var(--duration-normal) var(--ease-out);
}

.profile-list li::before {
    content: '';
    position: absolute;
    left: var(--space-md);
    top: calc(var(--space-md) + 8px);
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    transform: rotate(45deg);
    transition: transform var(--duration-normal) var(--ease-spring);
}

.profile-list li:hover {
    border-color: var(--border-accent);
    background: var(--surface-raised);
}

.profile-list li:hover::before {
    transform: rotate(45deg) scale(1.3);
}

/* ========== EXPERIENCE CARDS ========== */
.experience-grid {
    display: grid;
    gap: var(--space-md);
}

.experience-item {
    padding: var(--space-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

.experience-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent), var(--accent-dim));
    opacity: 0;
    transition: opacity var(--duration-normal);
}

.experience-item:hover {
    border-color: var(--border-accent);
    transform: translateX(8px);
    box-shadow: -8px 0 32px var(--accent-glow);
}

.experience-item:hover::before {
    opacity: 1;
}

.experience-item p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}


/* ========== SKILLS TABLE ========== */
.skills-section {
    margin-top: var(--space-xl);
}

.skills-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.skills-table tr {
    transition: background var(--duration-fast);
}

.skills-table tr:hover {
    background: var(--surface-raised);
}

.skills-table tr:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.skills-table td {
    padding: var(--space-md) var(--space-lg);
    vertical-align: middle;
}

.skills-table td:first-child {
    width: 45%;
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    border-right: 1px solid var(--border-accent);
}

.skills-table td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent);
    opacity: 0;
    transition: opacity var(--duration-fast);
}

.skills-table tr:hover td:first-child::before {
    opacity: 1;
}

.skills-table td:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

/* ========== CONTACT PAGE ========== */
.contact-intro {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: var(--max-text);
}

.contact-methods {
    display: grid;
    gap: var(--space-md);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all var(--duration-normal) var(--ease-out);
}

.contact-method:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px var(--accent-glow);
}

.contact-method-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--accent-soft);
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-method-icon svg {
    width: 24px;
    height: 24px;
}

.contact-method-content {
    flex: 1;
}

.contact-method-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-mono);
    margin-bottom: var(--space-xs);
}

.contact-method a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color var(--duration-fast);
}

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

/* Legacy contact support */
p.contact-method {
    display: block;
    background: none;
    border: none;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
}

p.contact-method:hover {
    transform: none;
    box-shadow: none;
}

p.contact-method a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

p.contact-method a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width var(--duration-normal) var(--ease-out);
}

p.contact-method a:hover::after {
    width: 100%;
}

/* ========== FOOTER ========== */
footer {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
    border-top: 1px solid var(--border);
    margin-top: var(--space-2xl);
}

footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    margin: 0;
}

/* ========== DECORATIVE ELEMENTS ========== */
.glow-orb {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    opacity: 0.5;
}

.glow-orb--top {
    top: -300px;
    right: -200px;
}

.glow-orb--bottom {
    bottom: -300px;
    left: -200px;
    background: radial-gradient(circle, var(--warm-glow) 0%, transparent 70%);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    :root {
        --space-lg: 1.5rem;
        --space-xl: 2.5rem;
        --space-2xl: 4rem;
    }

    .header-content {
        padding: var(--space-sm) var(--space-md);
    }

    .logo {
        font-size: 1.5rem;
    }

    .tagline {
        display: none;
    }

    main {
        padding: var(--space-xl) var(--space-md);
    }

    h1 {
        font-size: 2rem;
    }

    .page-nav {
        flex-direction: column;
    }

    .experience-item {
        padding: var(--space-md);
    }

    .experience-item:hover {
        transform: none;
    }

    .skills-table td {
        padding: var(--space-sm) var(--space-md);
        display: block;
    }

    .skills-table td:first-child {
        width: 100%;
        padding-bottom: var(--space-xs);
    }

    .skills-table td:last-child {
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    .logo-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    :root {
        --text-primary: #000;
        --text-secondary: #333;
        --text-muted: #666;
    }

    body {
        background: #fff;
        color: #000;
    }

    body::before {
        display: none;
    }

    header, footer, .page-nav, .glow-orb {
        display: none;
    }

    main {
        max-width: 100%;
        padding: 0;
    }

    h1 {
        font-size: 24pt;
        color: #000;
    }

    h2 {
        color: #000;
        font-size: 12pt;
    }

    h2::before {
        background: #000;
    }

    .profile-list li,
    .experience-item {
        background: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    .skills-table {
        background: none;
        border: 1px solid #ccc;
    }

    a {
        color: #000;
        text-decoration: none;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }
}
