/* ============================================
   Ops Home - Personal Homepage for IT Ops Engineer
   ============================================ */

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

:root {
    --bg-primary: #07110f;
    --bg-secondary: #101a18;
    --bg-card: #17231f;
    --bg-card-hover: #1d2d28;
    --text-primary: #edf6f0;
    --text-secondary: #a7b8b0;
    --text-dim: #6f837b;
    --accent: #30d5a0;
    --accent-dim: #11a77a;
    --green: #7ee787;
    --green-dim: #3fb965;
    --orange: #f6b85a;
    --red: #ff6b6b;
    --border: #22342f;
    --border-hover: #41635a;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --max-width: 1200px;
    --nav-height: 64px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-sans);
    background:
        radial-gradient(circle at 80% 10%, rgba(48, 213, 160, 0.08), transparent 34%),
        radial-gradient(circle at 8% 30%, rgba(246, 184, 90, 0.06), transparent 30%),
        var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(6, 182, 212, 0.3);
    color: #fff;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(7, 17, 15, 0.86);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transition: border-color 0.3s;
}

.navbar.scrolled {
    border-color: var(--border-hover);
}

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

.logo {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

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

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
}

/* ============================================
   Hero
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--nav-height);
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 17, 15, 0.96) 0%, rgba(7, 17, 15, 0.78) 44%, rgba(7, 17, 15, 0.18) 100%),
        linear-gradient(180deg, transparent 0%, var(--bg-primary) 100%);
    pointer-events: none;
}

.hero-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    opacity: 0.72;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    text-align: left;
    padding: 120px 0 80px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 32px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
    min-height: 1.3em;
}

.typing-line {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: clamp(1.6rem, 4vw, 3rem);
}

.prompt {
    color: var(--green);
    margin-right: 12px;
}

.typed-text {
    color: var(--text-primary);
}

.cursor-blink {
    color: var(--accent);
    animation: blink 1s steps(1) infinite;
    margin-left: 4px;
    font-weight: 300;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 0 40px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: 80px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: #0a0f16;
}

.btn-primary:hover {
    background: var(--accent-dim);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.25);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-hover);
}

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

.hero-stats {
    display: flex;
    justify-content: flex-start;
    gap: 48px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-number {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-suffix {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent);
    font-weight: 500;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 500;
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: 100px 0;
}

.section-alt {
    background: linear-gradient(180deg, var(--bg-secondary), #0d1714);
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 48px;
    max-width: 480px;
}

/* ============================================
   About
   ============================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.section-art {
    display: block;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
}

.about-art {
    aspect-ratio: 16 / 9;
    margin-bottom: 18px;
}

.tools-art {
    aspect-ratio: 21 / 7;
    margin: -18px 0 28px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.8;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.about-tags span {
    padding: 4px 12px;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
}

/* Terminal Window */
.terminal-window {
    background: #07100e;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

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

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: var(--red); }
.terminal-dot.yellow { background: var(--orange); }
.terminal-dot.green { background: var(--green); }

.terminal-title {
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
}

.terminal-body {
    padding: 20px 24px;
}

.terminal-body pre {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre;
}

.t-green { color: var(--green); }
.t-cyan { color: var(--accent); }

/* ============================================
   Skills
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    transition: all 0.3s;
}

.skill-category:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.skill-cat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.skill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 10px;
    color: var(--accent);
    flex-shrink: 0;
}

.skill-cat-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.skill-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-list li {
    position: relative;
    padding-left: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.skill-list li::before {
    content: '›';
    position: absolute;
    left: 4px;
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
}

/* ============================================
   Experience / Timeline
   ============================================ */
.timeline {
    position: relative;
    padding-left: 32px;
}

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

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

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

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    z-index: 1;
    transition: box-shadow 0.3s;
}

.timeline-item:hover .timeline-dot {
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 28px;
    transition: all 0.3s;
}

.timeline-content:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.timeline-period {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 8px;
}

.timeline-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-company {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.timeline-content ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-content li {
    position: relative;
    padding-left: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.timeline-content li::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: var(--accent);
}

/* ============================================
   Tools / Toolbox
   ============================================ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
}

.tool-item:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.tool-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.tool-emoji {
    font-size: 1.8rem;
}

.tool-icon-image {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.tool-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tool-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ============================================
   Contact
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
}

.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.contact-card svg {
    color: var(--accent);
    width: 28px;
    height: 28px;
}

.contact-card span {
    font-size: 0.95rem;
    font-weight: 500;
}

.contact-note {
    text-align: center;
    margin-top: 48px;
}

.contact-note p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.gpg-key {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(6, 182, 212, 0.08);
}

.copy-btn.copied {
    color: var(--green);
    border-color: var(--green);
}

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

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dim);
}

.footer-divider {
    color: var(--border);
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
}

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }
    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 15, 22, 0.98);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
        gap: 16px;
    }

    .nav-links.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

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

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

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

    .hero-stats {
        gap: 24px;
    }

    .hero-sub {
        font-size: 1rem;
    }

    .hero-actions {
        margin-bottom: 48px;
    }

    .section {
        padding: 64px 0;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline-dot {
        left: -24px;
        width: 12px;
        height: 12px;
    }

    .terminal-body {
        padding: 16px;
    }

    .terminal-body pre {
        font-size: 0.8rem;
    }

    .gpg-key {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .gpg-key code {
        word-break: break-all;
    }

    .copy-btn {
        align-self: center;
    }

    .footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

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

    .hero-title {
        font-size: 1.8rem;
    }

    .typing-line {
        font-size: 1.2rem;
    }
}
