/*
Theme Name: Sukasuka Portfolio
Theme URI: https://example.com/sukasuka-portfolio
Author: Your Name
Author URI: https://example.com
Description: A minimal portfolio theme with Sukasuka-inspired aesthetic for an industrial design student.
Version: 0.1.26
License: GNU General Public License v2 or later
Text Domain: sukasuka-portfolio
*/

:root {
    --bg-color: #f4f8fb;
    --surface-color: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --primary-color: #3498db;
    --primary-glow: rgba(52, 152, 219, 0.4);
    --secondary-color: #9b59b6;
    --border-color: #e1e8ed;
    --header-bg: rgba(255, 255, 255, 0.85);
    --sidebar-w: 240px;
    --sword-size: 26px;
    --sword-gap: 2.5em;
    --avatar-zoom: 1.9;
    --avatar-offset-x: 22px;
    --avatar-offset-y: 40px;
}

html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a { color: var(--primary-color); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #2980b9; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.site-header .container {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}
.site-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main);
    letter-spacing: 1px;
}
.site-nav a {
    margin-left: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s ease;
}
.site-nav a:hover {
    color: var(--primary-color);
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: 60vh;
    display: grid;
    place-items: center;
    text-align: center;
    background:
        radial-gradient(circle at 80% 20%, rgba(52, 152, 219, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(155, 89, 182, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #ffffff 0%, #f0f6fc 100%);
    position: relative;
    overflow: hidden;
}

/* Add some grid lines for "Industrial" feel */
.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(52, 152, 219, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52, 152, 219, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    top: 0; left: 0;
}

.hero > div {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -1px;
    margin-bottom: 16px;
    position: relative;
}
.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
.hero-title { animation: float 6s ease-in-out infinite; }

/* Starry Background */
.starry-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}
.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(52, 152, 219, 0.6);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 4px rgba(52, 152, 219, 0.8);
    animation: twinkle 3s infinite ease-in-out;
}
@keyframes twinkle {
    0% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0; transform: scale(0.5); }
}

/* Main Content */
.container { max-width: 1080px; margin: 0 auto; padding: 40px 24px; }
h2 {
    font-size: 28px;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    color: var(--text-main);
}
h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--primary-color);
    margin-top: 8px;
    border-radius: 2px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Card Styles */
.card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.3);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.card:hover img {
    transform: scale(1.05);
}

.card-body { padding: 20px; }
.card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: var(--text-main);
}
.card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    margin-right: 6px;
    margin-top: 6px;
    border-radius: 6px;
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Button */
.button {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    transition: all 0.2s;
}
.button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Footer */
.site-footer {
    margin-top: 80px;
    padding: 40px 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    background: #ffffff;
    color: var(--text-muted);
}
.zju-link { opacity: 0.8; }
.zju-link:hover { opacity: 1; color: var(--primary-color); }

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
    background: #2980b9;
}

@media (max-width: 1024px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .hero-title { font-size: 36px; }
}
@media (max-width: 640px) {
    .grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 32px; }
    .site-nav { display: none; } /* Hide nav on mobile since we don't have toggler yet */
}
.layout { display: block; }
.sidebar { width: var(--sidebar-w); background: #f5f7fa; border: 1px solid var(--border-color); border-radius: 12px; height: calc(100vh - 48px); position: fixed; left: 24px; top: 24px; padding: 24px 20px; box-shadow: 0 12px 24px rgba(0,0,0,0.06); z-index: 100; }
.content { min-width: 0; margin-left: calc(var(--sidebar-w) + 48px); padding-right: 24px; }
.admin-bar .sidebar { top: 32px; height: calc(100vh - 64px); }
.sidebar-user { text-align: center; }
.sidebar-avatar { margin-bottom: 10px; }
.avatar-block { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto; overflow: hidden; position: relative; box-shadow: 0 8px 20px rgba(0,0,0,0.18), 0 0 0 3px rgba(52,152,219,0.12), inset 0 0 20px rgba(0,0,0,0.08); background: #eaf2f8; display: flex; align-items: center; justify-content: center; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 62%; transform-origin: center; transform: translate(var(--avatar-offset-x), var(--avatar-offset-y)) scale(var(--avatar-zoom)); image-rendering: -webkit-optimize-contrast; }
.avatar-fallback { width: 100%; height: 100%; border-radius: 50%; background: #3498db; }
.sidebar-name { font-weight: 800; font-size: 18px; color: var(--text-main); text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar-role { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.sidebar-menu { list-style: none; padding: 0; margin: 20px 0; }
.sidebar-menu li { list-style: none; margin: 0 0 6px 0; padding: 0; }
.sidebar-menu li a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text-main); text-decoration: none; text-transform: uppercase; font-weight: 700; }
.sidebar-menu li a:hover { background: rgba(52,152,219,0.12); color: var(--primary-color); }
.sidebar-menu li a { display: flex; align-items: center; justify-content: flex-start; transition: transform .2s ease, background .2s ease, color .2s ease; transform-origin: left center; }
.sidebar-menu li:hover a { transform: scale(1.06); }
.sword { width: var(--sword-size); height: var(--sword-size); margin-left: var(--sword-gap); flex: 0 0 var(--sword-size); background-repeat: no-repeat; background-size: contain; background-position: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2)); image-rendering: pixelated; transform: none; }
.sidebar-menu li a:hover .sword { animation: sword-wiggle .6s ease-in-out infinite; }
@keyframes sword-wiggle {
  0% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  50% { transform: translateX(0); }
  75% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}
/* Fallback inline SVG sword */
.sword { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M14 2l8 8-2 2-8-8z' fill='%232BD1C1'/><rect x='10' y='5' width='4' height='13' rx='1' fill='%233498DB'/><path d='M6 20l4-4 2 2-4 4z' fill='%236B8F9C'/><rect x='4' y='22' width='7' height='2' rx='1' fill='%2360402A'/><circle cx='18' cy='10' r='1' fill='%23ffffff'/></svg>"); }
/* If MC sword assets exist, map per item */
.has-sword-icon .sidebar-menu li:nth-child(1) .sword { background-image: url("asset/img/mc/mc-wooden-sword.png"); }
.has-sword-icon .sidebar-menu li:nth-child(2) .sword { background-image: url("asset/img/mc/mc-stone-sword.png"); }
.has-sword-icon .sidebar-menu li:nth-child(3) .sword { background-image: url("asset/img/mc/mc-iron-sword.png"); }
.has-sword-icon .sidebar-menu li:nth-child(4) .sword { background-image: url("asset/img/mc/mc-golden-sword.png"); }
.has-sword-icon .sidebar-menu li:nth-child(5) .sword { background-image: url("asset/img/mc/mc-diamond-sword.png"); }
.sidebar-social { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.social-chip { display: inline-block; padding: 8px 12px; border-radius: 999px; background: rgba(52,152,219,0.1); border: 1px solid rgba(52,152,219,0.2); color: var(--primary-color); font-size: 12px; }
@media (max-width: 1024px) { :root { --sidebar-w: 220px; } .sidebar { left: 16px; } .content { margin-left: calc(var(--sidebar-w) + 32px); } }
@media (max-width: 640px) { .sidebar { display: none; } .content { margin-left: 0; padding-left: 16px; padding-right: 16px; } }

.profile-strip { background: #fff; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.profile { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.profile-text { display: flex; flex-direction: column; }
.profile-name { font-weight: 700; color: var(--text-main); }
.profile-tagline { color: var(--text-muted); font-size: 14px; }
.profile-actions .button { margin-left: 10px; }

.spotlight-section { padding-top: 0; }
.spotlight-card { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; }
.spotlight-media img { width: 100%; height: 340px; object-fit: cover; display: block; }
.spotlight-content h2 { margin-bottom: 10px; }
.spotlight-content h3 { margin: 6px 0 10px 0; color: var(--text-main); }
.spotlight-content p { color: var(--text-muted); }
.spotlight-quote { margin-top: 12px; padding: 10px 12px; border-left: 4px solid var(--primary-color); background: rgba(52,152,219,0.08); border-radius: 8px; color: var(--text-main); }
.spotlight-actions { margin-top: 16px; }

.quote-marquee { padding: 10px 0; }
.marquee { overflow: hidden; position: relative; }
.marquee-track { display: inline-block; white-space: nowrap; animation: marquee-left 24s linear infinite; }
.quote-item { display: inline-block; margin-right: 24px; padding: 6px 10px; background: rgba(52,152,219,0.12); color: var(--primary-color); border: 1px solid rgba(52,152,219,0.25); border-radius: 999px; font-size: 12px; }
@keyframes marquee-left { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.latest-posts .grid-posts { grid-template-columns: repeat(3, 1fr); }
.post-card { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; transition: all .3s ease; }
.post-card:hover { transform: translateY(-6px); box-shadow: 0 16px 30px rgba(52,152,219,0.15); border-color: rgba(52,152,219,0.3); }
.post-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.post-card .card-body { padding: 16px; }

.page { padding-top: 30px; }
.page-header { display:flex; align-items:center; justify-content: space-between; gap:16px; margin-bottom: 16px; }
.page-header h1 { margin:0; }
.page-header p { color: var(--text-muted); }
.contact-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.contact-card { background: var(--surface-color); border:1px solid var(--border-color); border-radius:12px; padding:12px 16px; }
.contact-title { font-weight:700; color: var(--text-main); margin-bottom: 6px; }
.contact-form h2 { margin-top: 10px; }
.contact-form .form-row { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form input, .contact-form textarea { width:100%; border:1px solid var(--border-color); border-radius:10px; padding:10px 12px; background:#fff; }
.contact-form button { margin-top: 10px; }
.resume { padding-top: 30px; }
.resume-header { display:flex; align-items:center; gap:16px; }
.resume-header h1 { margin:0; }
.resume-header p { color: var(--text-muted); }
.resume-grid { display:grid; grid-template-columns: 1fr; gap:24px; }
.resume-section h2 { margin:0 0 12px 0; }
.resume-item { background: var(--surface-color); border:1px solid var(--border-color); border-radius:12px; padding:12px 16px; }
.resume-item-title { font-weight:700; color: var(--text-main); }
.resume-item-sub { color: var(--text-muted); font-size: 13px; }
.resume-item-desc { color: var(--text-muted); font-size: 14px; margin-top:6px; }
.skill-row { display:grid; grid-template-columns: 140px 1fr; align-items:center; gap:12px; margin:10px 0; }
.skill-name { color: var(--text-main); font-weight:600; }
.skill-bar { height:8px; background:#e9eef3; border-radius:999px; overflow:hidden; border:1px solid var(--border-color); }
.skill-bar span { display:block; height:100%; background: linear-gradient(90deg, #3498db, #9b59b6); border-radius:999px; }

@media (max-width: 1024px) {
  .spotlight-card { grid-template-columns: 1fr; }
  .spotlight-media img { height: 240px; }
}
@media (max-width: 640px) {
  .profile { flex-direction: column; align-items: flex-start; }
  .latest-posts .grid-posts { grid-template-columns: 1fr; }
}
